mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-03-06 22:10:36 +00:00
Merge pull request #478 from Bloodknight/SDL_OpenGL_BPP_Fix
Fixes a resolution switching issue when the game uses **only** OpenGL…
This commit is contained in:
commit
2a2987869b
2 changed files with 29 additions and 6 deletions
|
|
@ -58,7 +58,16 @@ void EnumerateVideoModes(Vector<GFXVideoMode>& outModes)
|
|||
GFXVideoMode outMode;
|
||||
outMode.resolution.set( mode.w, mode.h );
|
||||
outMode.refreshRate = mode.refresh_rate;
|
||||
outMode.bitDepth = SDL_BYTESPERPIXEL( mode.format );
|
||||
|
||||
// BBP = 32 for some reason the engine knows it should be 32, but then we
|
||||
// add some extra code to break what the engine knows.
|
||||
//outMode.bitDepth = SDL_BYTESPERPIXEL( mode.format ); // sets bitdepths to 4
|
||||
//outMode.bitDepth = SDL_BITSPERPIXEL(mode.format); // sets bitdepth to 24
|
||||
|
||||
// hardcoded magic numbers ftw
|
||||
// This value is hardcoded in DX, probably to avoid the shenanigans going on here
|
||||
outMode.bitDepth = 32;
|
||||
|
||||
outMode.wideScreen = (mode.w / mode.h) > (4 / 3);
|
||||
outMode.fullScreen = true;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue