mirror of
				https://github.com/gnif/LookingGlass.git
				synced 2025-11-04 14:41:55 +00:00 
			
		
		
		
	[client] fix screensaver enable
The hint "SDL_HINT_VIDEO_ALLOW_SCREENSAVER" only works if set before SDL_Init(). Move it to the proper location.
This commit is contained in:
		@@ -1840,6 +1840,9 @@ static int lg_run()
 | 
			
		||||
     }
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  if (!params.noScreensaver)
 | 
			
		||||
    SDL_SetHint(SDL_HINT_VIDEO_ALLOW_SCREENSAVER, "1");
 | 
			
		||||
 | 
			
		||||
  if (SDL_Init(SDL_INIT_VIDEO) < 0)
 | 
			
		||||
  {
 | 
			
		||||
    DEBUG_ERROR("SDL_Init Failed");
 | 
			
		||||
@@ -1954,12 +1957,6 @@ static int lg_run()
 | 
			
		||||
  if (params.fullscreen)
 | 
			
		||||
    SDL_SetWindowFullscreen(g_state.window, SDL_WINDOW_FULLSCREEN_DESKTOP);
 | 
			
		||||
 | 
			
		||||
  if (!params.noScreensaver)
 | 
			
		||||
  {
 | 
			
		||||
    SDL_SetHint(SDL_HINT_VIDEO_ALLOW_SCREENSAVER, "1");
 | 
			
		||||
    SDL_EnableScreenSaver();
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  if (!params.center)
 | 
			
		||||
    SDL_SetWindowPosition(g_state.window, params.x, params.y);
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user