gsdx: Adjust current renderer message

The leading space was really annoying me. Also make the variable local
instead of static.

And fix a bad indentation.
This commit is contained in:
Jonathan Li 2015-11-11 18:34:12 +00:00
parent d952811ec8
commit 4eb57cde0e
1 changed files with 15 additions and 9 deletions

View File

@ -68,7 +68,6 @@ static bool s_vsync = false;
static bool s_exclusive = true; static bool s_exclusive = true;
static const char *s_renderer_name = ""; static const char *s_renderer_name = "";
static const char *s_renderer_type = ""; static const char *s_renderer_type = "";
static const char *s_type_log ="";
bool gsopen_done = false; // crash guard for GSgetTitleInfo2 and GSKeyEvent (replace with lock?) bool gsopen_done = false; // crash guard for GSgetTitleInfo2 and GSKeyEvent (replace with lock?)
EXPORT_C_(uint32) PS2EgetLibType() EXPORT_C_(uint32) PS2EgetLibType()
@ -209,27 +208,30 @@ static int _GSopen(void** dsp, char* title, GSRendererType renderer, int threads
s_gs = NULL; s_gs = NULL;
} }
const char* renderer_fullname = "";
const char* renderer_mode = "";
switch (renderer) switch (renderer)
{ {
case GSRendererType::DX9_SW: case GSRendererType::DX9_SW:
case GSRendererType::DX1011_SW: case GSRendererType::DX1011_SW:
case GSRendererType::Null_SW: case GSRendererType::Null_SW:
case GSRendererType::OGL_SW: case GSRendererType::OGL_SW:
s_type_log = "(Software mode)"; renderer_mode = "(Software mode)";
break; break;
case GSRendererType::DX9_Null: case GSRendererType::DX9_Null:
case GSRendererType::DX1011_Null: case GSRendererType::DX1011_Null:
case GSRendererType::Null_Null: case GSRendererType::Null_Null:
s_type_log = "(Null mode)"; renderer_mode = "(Null mode)";
break; break;
case GSRendererType::DX9_OpenCL: case GSRendererType::DX9_OpenCL:
case GSRendererType::DX1011_OpenCL: case GSRendererType::DX1011_OpenCL:
case GSRendererType::Null_OpenCL: case GSRendererType::Null_OpenCL:
case GSRendererType::OGL_OpenCL: case GSRendererType::OGL_OpenCL:
s_type_log = "(OpenCL)"; renderer_mode = "(OpenCL)";
break; break;
default: default:
s_type_log = "(Hardware mode)"; renderer_mode = "(Hardware mode)";
break; break;
} }
@ -243,7 +245,7 @@ static int _GSopen(void** dsp, char* title, GSRendererType renderer, int threads
case GSRendererType::DX9_OpenCL: case GSRendererType::DX9_OpenCL:
dev = new GSDevice9(); dev = new GSDevice9();
s_renderer_name = " D3D9"; s_renderer_name = " D3D9";
printf("\n Current Renderer: Direct3D9%s \n", s_type_log); renderer_fullname = "Direct3D9";
break; break;
case GSRendererType::DX1011_HW: case GSRendererType::DX1011_HW:
case GSRendererType::DX1011_SW: case GSRendererType::DX1011_SW:
@ -251,7 +253,7 @@ static int _GSopen(void** dsp, char* title, GSRendererType renderer, int threads
case GSRendererType::DX1011_OpenCL: case GSRendererType::DX1011_OpenCL:
dev = new GSDevice11(); dev = new GSDevice11();
s_renderer_name = " D3D11"; s_renderer_name = " D3D11";
printf("\n Current Renderer: Direct3D11%s \n", s_type_log); renderer_fullname = "Direct3D11";
break; break;
#endif #endif
case GSRendererType::Null_HW: case GSRendererType::Null_HW:
@ -259,16 +261,20 @@ static int _GSopen(void** dsp, char* title, GSRendererType renderer, int threads
case GSRendererType::Null_Null: case GSRendererType::Null_Null:
case GSRendererType::Null_OpenCL: case GSRendererType::Null_OpenCL:
dev = new GSDeviceNull(); dev = new GSDeviceNull();
s_renderer_name = " Null";
renderer_fullname = "Null";
break; break;
case GSRendererType::OGL_HW: case GSRendererType::OGL_HW:
case GSRendererType::OGL_SW: case GSRendererType::OGL_SW:
case GSRendererType::OGL_OpenCL: case GSRendererType::OGL_OpenCL:
dev = new GSDeviceOGL(); dev = new GSDeviceOGL();
s_renderer_name = " OGL"; s_renderer_name = " OGL";
printf("\n Current Renderer: OpenGL%s \n", s_type_log); renderer_fullname = "OpenGL";
break; break;
} }
printf("Current Renderer: %s %s\n", renderer_fullname, renderer_mode);
if (dev == NULL) if (dev == NULL)
{ {
return -1; return -1;
@ -304,7 +310,7 @@ static int _GSopen(void** dsp, char* title, GSRendererType renderer, int threads
case GSRendererType::DX1011_Null: case GSRendererType::DX1011_Null:
case GSRendererType::Null_Null: case GSRendererType::Null_Null:
s_gs = new GSRendererNull(); s_gs = new GSRendererNull();
s_renderer_type = " Null"; s_renderer_type = " Null";
break; break;
case GSRendererType::DX9_OpenCL: case GSRendererType::DX9_OpenCL:
case GSRendererType::DX1011_OpenCL: case GSRendererType::DX1011_OpenCL: