(#677) Switch the relative mouse mode depending on flying mode

master
rexim 2019-02-10 23:02:49 +07:00
parent e5019692b6
commit c048086081
2 changed files with 1 additions and 4 deletions

View File

@ -485,6 +485,7 @@ struct EvalResult level_send(Level *level, Gc *gc, struct Scope *scope, struct E
hexstr(color))));
} else if (strcmp(target, "fly") == 0) {
level->flying_mode = !level->flying_mode;
SDL_SetRelativeMouseMode(level->flying_mode);
return eval_success(NIL(gc));
}

View File

@ -95,10 +95,6 @@ int main(int argc, char *argv[])
log_fail("Could not set up blending mode for the renderer: %s\n", SDL_GetError());
RETURN_LT(lt, -1);
}
if (SDL_SetRelativeMouseMode(SDL_TRUE) < 0) {
log_fail("Could not set mouse to relative mode: %s\n", SDL_GetError());
RETURN_LT(lt, -1);
}
SDL_Joystick *the_stick_of_joy = NULL;