File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -404,7 +404,10 @@ void RenderLoop::MouseDownEvent(const SDL_MouseButtonEvent& event)
404404 break ;
405405
406406 case SDL_BUTTON_RIGHT:
407- _sdlRenderingWindow.ToggleFullscreen ();
407+ if (!_keyStates.AnyPressed ())
408+ {
409+ _sdlRenderingWindow.ToggleFullscreen ();
410+ }
408411 break ;
409412
410413 case SDL_BUTTON_MIDDLE:
Original file line number Diff line number Diff line change @@ -21,6 +21,11 @@ class RenderLoop
2121
2222protected:
2323 struct ModifierKeyStates {
24+ bool AnyPressed () const
25+ {
26+ return _shiftPressed || _ctrlPressed || _altPressed || _metaPressed;
27+ }
28+
2429 bool _shiftPressed{false }; // !< L/R shift keys
2530 bool _ctrlPressed{false }; // !< L/R control keys
2631 bool _altPressed{false }; // !< L/R alt keys
You can’t perform that action at this time.
0 commit comments