Kaynağa Gözat

WinKey+Shift+L/R Arrow handler.
Attempts to constrain canvas when switching between monitors via keyboard shortcut.

OTHGMars 3 yıl önce
ebeveyn
işleme
13a53dd0ca
1 değiştirilmiş dosya ile 5 ekleme ve 0 silme
  1. 5 0
      Engine/source/windowManager/sdl/sdlWindow.cpp

+ 5 - 0
Engine/source/windowManager/sdl/sdlWindow.cpp

@@ -672,6 +672,11 @@ void PlatformWindowSDL::_processSDLEvent(SDL_Event &evt)
             case SDL_WINDOWEVENT_RESTORED:
                Con::setBoolVariable("pref::Video::isMaximized", false);
                break;
+            case SDL_WINDOWEVENT_DISPLAY_CHANGED:
+               Con::printf("Window moved to display #%d", evt.window.data1);
+               Con::setIntVariable("pref::Video::deviceId", evt.window.data1);
+               Con::evaluate("configureCanvas();");
+               break;
 
             default:
                break;