mirror of https://github.com/PCSX2/pcsx2.git
Merge pull request #617 from ssakash/patch-26
Console log message for current renderer.
This commit is contained in:
commit
c659b1aa18
|
@ -68,6 +68,7 @@ static bool s_vsync = false;
|
|||
static bool s_exclusive = true;
|
||||
static const char *s_renderer_name = "";
|
||||
static const char *s_renderer_type = "";
|
||||
static const char *s_type_log ="";
|
||||
#ifdef _WINDOWS
|
||||
static bool s_isgsopen2 = false; // boolean to remove some stuff from the config panel in new PCSX2's/
|
||||
#endif
|
||||
|
@ -216,7 +217,7 @@ static int _GSopen(void** dsp, char* title, int renderer, int threads = -1)
|
|||
|
||||
try
|
||||
{
|
||||
if(s_renderer != renderer)
|
||||
if (s_renderer != renderer)
|
||||
{
|
||||
// Emulator has made a render change request, which requires a completely
|
||||
// new s_gs -- if the emu doesn't save/restore the GS state across this
|
||||
|
@ -227,17 +228,35 @@ static int _GSopen(void** dsp, char* title, int renderer, int threads = -1)
|
|||
s_gs = NULL;
|
||||
}
|
||||
|
||||
switch(renderer)
|
||||
switch (renderer)
|
||||
{
|
||||
case 1: case 4: case 10: case 13:
|
||||
s_type_log = "(Software mode)";
|
||||
break;
|
||||
case 2: case 5: case 11:
|
||||
s_type_log = "(Null mode)";
|
||||
break;
|
||||
case 14: case 15: case 16: case 17:
|
||||
s_type_log = "(OpenCL)";
|
||||
break;
|
||||
default:
|
||||
s_type_log = "(Hardware mode)";
|
||||
break;
|
||||
}
|
||||
|
||||
switch (renderer)
|
||||
{
|
||||
default:
|
||||
#ifdef _WINDOWS
|
||||
case 0: case 1: case 2: case 14:
|
||||
dev = new GSDevice9();
|
||||
s_renderer_name = " D3D9";
|
||||
printf("\n Current Renderer: Direct3D9%s \n", s_type_log);
|
||||
break;
|
||||
case 3: case 4: case 5: case 15:
|
||||
dev = new GSDevice11();
|
||||
s_renderer_name = " D3D11";
|
||||
printf("\n Current Renderer: Direct3D11%s \n", s_type_log);
|
||||
break;
|
||||
#endif
|
||||
case 9: case 10: case 11: case 16:
|
||||
|
@ -246,17 +265,18 @@ static int _GSopen(void** dsp, char* title, int renderer, int threads = -1)
|
|||
case 12: case 13: case 17:
|
||||
dev = new GSDeviceOGL();
|
||||
s_renderer_name = " OGL";
|
||||
printf("\n Current Renderer: OpenGL%s \n", s_type_log);
|
||||
break;
|
||||
}
|
||||
|
||||
if(dev == NULL)
|
||||
if (dev == NULL)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
if(s_gs == NULL)
|
||||
if (s_gs == NULL)
|
||||
{
|
||||
switch(renderer)
|
||||
switch (renderer)
|
||||
{
|
||||
default:
|
||||
#ifdef _WINDOWS
|
||||
|
@ -279,6 +299,7 @@ static int _GSopen(void** dsp, char* title, int renderer, int threads = -1)
|
|||
break;
|
||||
case 2: case 5: case 11:
|
||||
s_gs = new GSRendererNull();
|
||||
s_renderer_type = " Null";
|
||||
break;
|
||||
case 14: case 15: case 16: case 17:
|
||||
#ifdef ENABLE_OPENCL
|
||||
|
@ -298,7 +319,7 @@ static int _GSopen(void** dsp, char* title, int renderer, int threads = -1)
|
|||
if (s_gs->m_wnd == NULL)
|
||||
{
|
||||
#ifdef _WINDOWS
|
||||
switch(renderer)
|
||||
switch (renderer)
|
||||
{
|
||||
case 12: case 13: case 17:
|
||||
s_gs->m_wnd = new GSWndWGL();
|
||||
|
@ -317,7 +338,7 @@ static int _GSopen(void** dsp, char* title, int renderer, int threads = -1)
|
|||
#endif
|
||||
}
|
||||
}
|
||||
catch(std::exception& ex)
|
||||
catch (std::exception& ex)
|
||||
{
|
||||
// Allowing std exceptions to escape the scope of the plugin callstack could
|
||||
// be problematic, because of differing typeids between DLL and EXE compilations.
|
||||
|
|
Loading…
Reference in New Issue