Skip to content
This repository has been archived by the owner on Jul 24, 2022. It is now read-only.

Commit

Permalink
- add GLES radio button
Browse files Browse the repository at this point in the history
  • Loading branch information
madame-rachelle committed May 22, 2021
1 parent 30a2b7b commit 80717c2
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/common/platform/posix/cocoa/i_video.mm
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,7 @@ void SetupOpenGLView(CocoaWindow* const window, const OpenGLProfile profile)

if (fb == nullptr)
{
if( Args->CheckParm ("-gles2_renderer") || vid_preferbackend == 3 )
if( (Args->CheckParm ("-gles2_renderer")) || (vid_preferbackend == 3) )
fb = new OpenGLESRenderer::OpenGLFrameBuffer(0, vid_fullscreen);
else
fb = new OpenGLRenderer::OpenGLFrameBuffer(0, vid_fullscreen);
Expand Down
2 changes: 1 addition & 1 deletion src/common/platform/posix/sdl/sdlglvideo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ DFrameBuffer *SDLVideo::CreateFrameBuffer ()
#endif
if (fb == nullptr)
{
if( Args->CheckParm ("-gles2_renderer") || vid_preferbackend == 3 )
if( (Args->CheckParm ("-gles2_renderer")) || (vid_preferbackend == 3) )
fb = new OpenGLESRenderer::OpenGLFrameBuffer(0, vid_fullscreen);
else
fb = new OpenGLRenderer::OpenGLFrameBuffer(0, vid_fullscreen);
Expand Down
8 changes: 6 additions & 2 deletions src/common/platform/win32/i_system.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,6 @@ BOOL CALLBACK IWADBoxCallback(HWND hDlg, UINT message, WPARAM wParam, LPARAM lPa
char szString[256];

// Check the current video settings.
//SendDlgItemMessage( hDlg, vid_renderer ? IDC_WELCOME_OPENGL : IDC_WELCOME_SOFTWARE, BM_SETCHECK, BST_CHECKED, 0 );
SendDlgItemMessage( hDlg, IDC_WELCOME_FULLSCREEN, BM_SETCHECK, vid_fullscreen ? BST_CHECKED : BST_UNCHECKED, 0 );
switch (vid_preferbackend)
{
Expand All @@ -520,6 +519,9 @@ BOOL CALLBACK IWADBoxCallback(HWND hDlg, UINT message, WPARAM wParam, LPARAM lPa
case 2:
SendDlgItemMessage( hDlg, IDC_WELCOME_VULKAN3, BM_SETCHECK, BST_CHECKED, 0 );
break;
case 3:
SendDlgItemMessage( hDlg, IDC_WELCOME_VULKAN4, BM_SETCHECK, BST_CHECKED, 0 );
break;
default:
SendDlgItemMessage( hDlg, IDC_WELCOME_VULKAN1, BM_SETCHECK, BST_CHECKED, 0 );
break;
Expand Down Expand Up @@ -574,7 +576,9 @@ BOOL CALLBACK IWADBoxCallback(HWND hDlg, UINT message, WPARAM wParam, LPARAM lPa
SetQueryIWad(hDlg);
// [SP] Upstreamed from Zandronum
vid_fullscreen = SendDlgItemMessage( hDlg, IDC_WELCOME_FULLSCREEN, BM_GETCHECK, 0, 0 ) == BST_CHECKED;
if (SendDlgItemMessage(hDlg, IDC_WELCOME_VULKAN3, BM_GETCHECK, 0, 0) == BST_CHECKED)
if (SendDlgItemMessage(hDlg, IDC_WELCOME_VULKAN4, BM_GETCHECK, 0, 0) == BST_CHECKED)
vid_preferbackend = 3;
else if (SendDlgItemMessage(hDlg, IDC_WELCOME_VULKAN3, BM_GETCHECK, 0, 0) == BST_CHECKED)
vid_preferbackend = 2;
else if (SendDlgItemMessage(hDlg, IDC_WELCOME_VULKAN2, BM_GETCHECK, 0, 0) == BST_CHECKED)
vid_preferbackend = 1;
Expand Down
1 change: 1 addition & 0 deletions src/common/platform/win32/resource.h
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@
#define IDC_RADIO3 1086
#define IDC_WELCOME_VULKAN3 1086
#define IDCE_ROOM 1087
#define IDC_WELCOME_VULKAN4 1187
#define IDCS_ROOM 1088
#define IDCE_ROOMHF 1089
#define IDCS_ROOMHF 1090
Expand Down
2 changes: 1 addition & 1 deletion src/common/platform/win32/win32glvideo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ DFrameBuffer *Win32GLVideo::CreateFrameBuffer()
{
SystemGLFrameBuffer *fb;

if (Args->CheckParm("-gles2_renderer") || vid_preferbackend == 3 )
if ((Args->CheckParm("-gles2_renderer")) || (vid_preferbackend == 3) )
fb = new OpenGLESRenderer::OpenGLFrameBuffer(m_hMonitor, vid_fullscreen);
else
fb = new OpenGLRenderer::OpenGLFrameBuffer(m_hMonitor, vid_fullscreen);
Expand Down
5 changes: 3 additions & 2 deletions src/win32/zdoom.rc
Original file line number Diff line number Diff line change
Expand Up @@ -226,9 +226,10 @@ BEGIN
PUSHBUTTON "E&xit",IDCANCEL,166,227,50,14
CONTROL "&OpenGL",IDC_WELCOME_VULKAN1,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,13,167,41,10
#ifdef HAVE_VULKAN
CONTROL "&Vulkan",IDC_WELCOME_VULKAN2,"Button",BS_AUTORADIOBUTTON,13,177,37,10
CONTROL "&Vulkan",IDC_WELCOME_VULKAN2,"Button",BS_AUTORADIOBUTTON,13,176,37,10
#endif
CONTROL "&SoftPoly",IDC_WELCOME_VULKAN3,"Button",BS_AUTORADIOBUTTON,13,188,43,10
CONTROL "&SoftPoly",IDC_WELCOME_VULKAN3,"Button",BS_AUTORADIOBUTTON,13,185,43,10
CONTROL "OpenGL &ES",IDC_WELCOME_VULKAN4,"Button",BS_AUTORADIOBUTTON,13,194,53,10
END

IDD_CRASHDIALOG DIALOGEX 0, 0, 415, 308
Expand Down

0 comments on commit 80717c2

Please sign in to comment.