mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-29 15:32:57 +00:00
- fixed: Added currentrenderer checks to SDL and COCOA implementations of 'swtruecolor'
This commit is contained in:
parent
dfa5a3cd07
commit
65399bf075
2 changed files with 17 additions and 11 deletions
|
@ -116,6 +116,8 @@
|
||||||
|
|
||||||
DFrameBuffer *CreateGLSWFrameBuffer(int width, int height, bool bgra, bool fullscreen);
|
DFrameBuffer *CreateGLSWFrameBuffer(int width, int height, bool bgra, bool fullscreen);
|
||||||
|
|
||||||
|
int currentrenderer;
|
||||||
|
|
||||||
CUSTOM_CVAR(Bool, vid_glswfb, true, CVAR_NOINITCALL | CVAR_GLOBALCONFIG | CVAR_NOINITCALL)
|
CUSTOM_CVAR(Bool, vid_glswfb, true, CVAR_NOINITCALL | CVAR_GLOBALCONFIG | CVAR_NOINITCALL)
|
||||||
{
|
{
|
||||||
Printf("This won't take effect until " GAMENAME " is restarted.\n");
|
Printf("This won't take effect until " GAMENAME " is restarted.\n");
|
||||||
|
@ -135,11 +137,14 @@ CUSTOM_CVAR(Bool, swtruecolor, TRUECOLOR_DEFAULT, CVAR_ARCHIVE | CVAR_GLOBALCONF
|
||||||
{
|
{
|
||||||
// Strictly speaking this doesn't require a mode switch, but it is the easiest
|
// Strictly speaking this doesn't require a mode switch, but it is the easiest
|
||||||
// way to force a CreateFramebuffer call without a lot of refactoring.
|
// way to force a CreateFramebuffer call without a lot of refactoring.
|
||||||
extern int NewWidth, NewHeight, NewBits, DisplayBits;
|
if (currentrenderer == 0)
|
||||||
NewWidth = screen->GetWidth();
|
{
|
||||||
NewHeight = screen->GetHeight();
|
extern int NewWidth, NewHeight, NewBits, DisplayBits;
|
||||||
NewBits = DisplayBits;
|
NewWidth = screen->GetWidth();
|
||||||
setmodeneeded = true;
|
NewHeight = screen->GetHeight();
|
||||||
|
NewBits = DisplayBits;
|
||||||
|
setmodeneeded = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
CUSTOM_CVAR(Bool, fullscreen, false, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
|
CUSTOM_CVAR(Bool, fullscreen, false, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
|
||||||
|
@ -157,8 +162,6 @@ CUSTOM_CVAR(Bool, vid_autoswitch, true, CVAR_ARCHIVE | CVAR_GLOBALCONFIG | CVAR_
|
||||||
Printf("You must restart " GAMENAME " to apply graphics switching mode\n");
|
Printf("You must restart " GAMENAME " to apply graphics switching mode\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
int currentrenderer;
|
|
||||||
|
|
||||||
CUSTOM_CVAR(Int, vid_renderer, 1, CVAR_ARCHIVE | CVAR_GLOBALCONFIG | CVAR_NOINITCALL)
|
CUSTOM_CVAR(Int, vid_renderer, 1, CVAR_ARCHIVE | CVAR_GLOBALCONFIG | CVAR_NOINITCALL)
|
||||||
{
|
{
|
||||||
// 0: Software renderer
|
// 0: Software renderer
|
||||||
|
|
|
@ -323,10 +323,13 @@ CUSTOM_CVAR(Bool, swtruecolor, true, CVAR_ARCHIVE|CVAR_GLOBALCONFIG|CVAR_NOINITC
|
||||||
{
|
{
|
||||||
// Strictly speaking this doesn't require a mode switch, but it is the easiest
|
// Strictly speaking this doesn't require a mode switch, but it is the easiest
|
||||||
// way to force a CreateFramebuffer call without a lot of refactoring.
|
// way to force a CreateFramebuffer call without a lot of refactoring.
|
||||||
NewWidth = screen->GetWidth();
|
if (currentrenderer == 0)
|
||||||
NewHeight = screen->GetHeight();
|
{
|
||||||
NewBits = DisplayBits;
|
NewWidth = screen->GetWidth();
|
||||||
setmodeneeded = true;
|
NewHeight = screen->GetHeight();
|
||||||
|
NewBits = DisplayBits;
|
||||||
|
setmodeneeded = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
CUSTOM_CVAR (Bool, fullscreen, false, CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
|
CUSTOM_CVAR (Bool, fullscreen, false, CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
|
||||||
|
|
Loading…
Reference in a new issue