(#677) Switch the relative mouse mode depending on flying mode
parent
e5019692b6
commit
c048086081
|
@ -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));
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue