mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-11 06:34:36 +00:00
commit
e7e11b19c3
2 changed files with 10 additions and 5 deletions
|
|
@ -646,7 +646,11 @@ void PlatformWindowSDL::_processSDLEvent(SDL_Event &evt)
|
|||
break;
|
||||
case SDL_WINDOWEVENT_MOVED:
|
||||
{
|
||||
S32 oldDisplay = Con::getIntVariable("pref::Video::deviceId", 0);
|
||||
_updateMonitorFromMove(evt);
|
||||
// If display device has changed, make sure window params are compatible with the new device.
|
||||
if (oldDisplay != Con::getIntVariable("pref::Video::deviceId", 0))
|
||||
Con::evaluate("configureCanvas();");
|
||||
break;
|
||||
}
|
||||
case SDL_WINDOWEVENT_RESIZED:
|
||||
|
|
@ -672,11 +676,6 @@ 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;
|
||||
|
|
|
|||
|
|
@ -106,6 +106,7 @@ function OptionsMenu::onOpen(%this)
|
|||
}
|
||||
|
||||
%this.unappliedChanges.empty();
|
||||
$pref::Video::displayDeviceId = "";
|
||||
|
||||
OptionsMenuCategoryList.setAsActiveMenuList();
|
||||
|
||||
|
|
@ -442,6 +443,11 @@ function populateDisplaySettingsList()
|
|||
%resolution = _makePrettyResString(%resolution);
|
||||
|
||||
OptionsMenuSettingsList.addOptionRow("Resolution", "$pref::Video::Resolution", %resolutionList, false, "", true, "Resolution of the game window", %resolution);
|
||||
|
||||
// If the requested resolution could not be set, mark the control and pref as changed.
|
||||
%resControl = OptionsMenuSettingsList.getObject(OptionsMenuSettingsList.getCount()-1);
|
||||
if (%resControl.getCurrentOption() !$= %resolution)
|
||||
%resControl.onChange();
|
||||
}
|
||||
|
||||
OptionsMenuSettingsList.addOptionBoolRow("VSync", "$pref::Video::enableVerticalSync", $YesNoList, false, "", true, "", "");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue