mirror of
https://github.com/moonlight-stream/moonlight-embedded.git
synced 2026-04-18 14:30:17 +00:00
Grab mouse only once streaming has started
This commit is contained in:
@@ -50,7 +50,6 @@ void sdl_init(int width, int height, bool fullscreen) {
|
||||
exit(1);
|
||||
}
|
||||
|
||||
SDL_SetRelativeMouseMode(SDL_TRUE);
|
||||
renderer = SDL_CreateRenderer(window, -1, SDL_RENDERER_ACCELERATED | SDL_RENDERER_PRESENTVSYNC);
|
||||
if (!renderer) {
|
||||
printf("SDL_CreateRenderer failed: %s\n", SDL_GetError());
|
||||
@@ -72,6 +71,9 @@ void sdl_init(int width, int height, bool fullscreen) {
|
||||
|
||||
void sdl_loop() {
|
||||
SDL_Event event;
|
||||
|
||||
SDL_SetRelativeMouseMode(SDL_TRUE);
|
||||
|
||||
while(!done && SDL_WaitEvent(&event)) {
|
||||
switch (sdlinput_handle_event(&event)) {
|
||||
case SDL_QUIT_APPLICATION:
|
||||
|
||||
Reference in New Issue
Block a user