mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-10 14:51:40 +00:00
- Changed cocoa backend's s_currentRenderer to match PC version's 'currentrenderer' to address a possible Mac compilation issue.
This commit is contained in:
parent
6e25c34fda
commit
dfa5a3cd07
1 changed files with 5 additions and 5 deletions
|
@ -157,14 +157,14 @@ 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");
|
||||||
}
|
}
|
||||||
|
|
||||||
static int s_currentRenderer;
|
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
|
||||||
// 1: OpenGL renderer
|
// 1: OpenGL renderer
|
||||||
|
|
||||||
if (self != s_currentRenderer)
|
if (self != currentrenderer)
|
||||||
{
|
{
|
||||||
switch (self)
|
switch (self)
|
||||||
{
|
{
|
||||||
|
@ -657,7 +657,7 @@ DFrameBuffer* CocoaVideo::CreateFrameBuffer(const int width, const int height, c
|
||||||
|
|
||||||
DFrameBuffer* fb = NULL;
|
DFrameBuffer* fb = NULL;
|
||||||
|
|
||||||
if (1 == s_currentRenderer)
|
if (1 == currentrenderer)
|
||||||
{
|
{
|
||||||
fb = new OpenGLFrameBuffer(NULL, width, height, 32, 60, fullscreen);
|
fb = new OpenGLFrameBuffer(NULL, width, height, 32, 60, fullscreen);
|
||||||
}
|
}
|
||||||
|
@ -1360,13 +1360,13 @@ static void I_DeleteRenderer()
|
||||||
|
|
||||||
void I_CreateRenderer()
|
void I_CreateRenderer()
|
||||||
{
|
{
|
||||||
s_currentRenderer = vid_renderer;
|
currentrenderer = vid_renderer;
|
||||||
|
|
||||||
if (NULL == Renderer)
|
if (NULL == Renderer)
|
||||||
{
|
{
|
||||||
extern FRenderer* gl_CreateInterface();
|
extern FRenderer* gl_CreateInterface();
|
||||||
|
|
||||||
Renderer = 1 == s_currentRenderer
|
Renderer = 1 == currentrenderer
|
||||||
? gl_CreateInterface()
|
? gl_CreateInterface()
|
||||||
: new FSoftwareRenderer;
|
: new FSoftwareRenderer;
|
||||||
atterm(I_DeleteRenderer);
|
atterm(I_DeleteRenderer);
|
||||||
|
|
Loading…
Reference in a new issue