mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-13 15:44:36 +00:00
_GFXInitGetInitialRes() cleanup
Removes unnecessary code that sets default video mode params. This is already handled by the GFXVideoMode constructor. The settings are also immediately overwritten by vm.parseFromString(). Resolves #740
This commit is contained in:
parent
d030eeb786
commit
38237bfb62
1 changed files with 3 additions and 16 deletions
|
|
@ -84,28 +84,15 @@ inline static void _GFXInitReportAdapters(Vector<GFXAdapter*> &adapters)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
inline static void _GFXInitGetInitialRes(GFXVideoMode &vm, const Point2I &initialSize)
|
inline static void _GFXInitGetInitialRes(GFXVideoMode &vm)
|
||||||
{
|
{
|
||||||
const U32 kDefaultWindowSizeX = 800;
|
|
||||||
const U32 kDefaultWindowSizeY = 600;
|
|
||||||
const bool kDefaultFullscreen = false;
|
|
||||||
const U32 kDefaultBitDepth = 32;
|
|
||||||
const U32 kDefaultRefreshRate = 60;
|
|
||||||
|
|
||||||
// cache the desktop size of the main screen
|
// cache the desktop size of the main screen
|
||||||
GFXVideoMode desktopVm = GFXInit::getDesktopResolution();
|
GFXVideoMode desktopVm = GFXInit::getDesktopResolution();
|
||||||
|
|
||||||
// load pref variables, properly choose windowed / fullscreen
|
// load pref variables, properly choose windowed / fullscreen
|
||||||
const String resString = Con::getVariable("$pref::Video::mode");
|
const String resString = Con::getVariable("$pref::Video::mode");
|
||||||
|
|
||||||
// Set defaults into the video mode, then have it parse the user string.
|
// Parse video mode settings from pref string
|
||||||
vm.resolution.x = kDefaultWindowSizeX;
|
|
||||||
vm.resolution.y = kDefaultWindowSizeY;
|
|
||||||
vm.fullScreen = kDefaultFullscreen;
|
|
||||||
vm.bitDepth = kDefaultBitDepth;
|
|
||||||
vm.refreshRate = kDefaultRefreshRate;
|
|
||||||
vm.wideScreen = false;
|
|
||||||
|
|
||||||
vm.parseFromString(resString);
|
vm.parseFromString(resString);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -365,7 +352,7 @@ GFXAdapter *GFXInit::getBestAdapterChoice()
|
||||||
GFXVideoMode GFXInit::getInitialVideoMode()
|
GFXVideoMode GFXInit::getInitialVideoMode()
|
||||||
{
|
{
|
||||||
GFXVideoMode vm;
|
GFXVideoMode vm;
|
||||||
_GFXInitGetInitialRes(vm, Point2I(800,600));
|
_GFXInitGetInitialRes(vm);
|
||||||
return vm;
|
return vm;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue