Performance improvements part III

This commit is contained in:
Stefan Arentz 2017-09-24 08:19:52 -04:00
parent c3097ea5ed
commit 0d2844d505
2 changed files with 1 additions and 6 deletions

View File

@ -509,9 +509,6 @@ static bool ewm_two_poll_event(struct ewm_two_t *two, SDL_Window *window) { // T
SDL_SetWindowSize(window, 40*7*3, 24*8*3 + (two->status_bar_visible ? (9*3) : 0));
SDL_RenderSetLogicalSize(two->scr->renderer, 40*7*3, 24*8*3 + (two->status_bar_visible ? (9*3) : 0));
break;
case SDLK_p:
two->paused = !two->paused;
break;
}
} else if (event.key.keysym.mod == KMOD_NONE) {
switch (event.key.keysym.sym) {
@ -885,7 +882,7 @@ int ewm_two_main(int argc, char **argv) {
break;
}
if (!two->paused && (SDL_GetTicks() - ticks) >= (1000 / fps)) {
if ((SDL_GetTicks() - ticks) >= (1000 / fps)) {
if (!ewm_two_step_cpu(two, EWM_TWO_SPEED / fps)) {
break;
}

View File

@ -96,8 +96,6 @@ struct ewm_two_t {
int lua_key_down_fn;
int lua_key_up_fn;
bool paused;
};
struct ewm_two_t *ewm_two_create(int type, SDL_Renderer *renderer, SDL_Joystick *joystick);