mirror of https://github.com/PCSX2/pcsx2.git
Merge pull request #640 from turtleli/gs-frame-title-fixes
GS frame title fixes
This commit is contained in:
commit
7f7f6c3b51
|
@ -558,6 +558,7 @@ void GSFrame::OnUpdateTitle( wxTimerEvent& evt )
|
||||||
double fps = wxGetApp().FpsManager.GetFramerate();
|
double fps = wxGetApp().FpsManager.GetFramerate();
|
||||||
|
|
||||||
char gsDest[128];
|
char gsDest[128];
|
||||||
|
gsDest[0] = 0; // No need to set whole array to NULL.
|
||||||
GSgetTitleInfo2( gsDest, sizeof(gsDest) );
|
GSgetTitleInfo2( gsDest, sizeof(gsDest) );
|
||||||
|
|
||||||
const wxChar* limiterStr = L"None";
|
const wxChar* limiterStr = L"None";
|
||||||
|
|
|
@ -72,7 +72,7 @@ static const char *s_type_log ="";
|
||||||
#ifdef _WINDOWS
|
#ifdef _WINDOWS
|
||||||
static bool s_isgsopen2 = false; // boolean to remove some stuff from the config panel in new PCSX2's/
|
static bool s_isgsopen2 = false; // boolean to remove some stuff from the config panel in new PCSX2's/
|
||||||
#endif
|
#endif
|
||||||
bool gsopen_done = false; // crash guard for GSgetTitleInfo2
|
bool gsopen_done = false; // crash guard for GSgetTitleInfo2 and GSKeyEvent (replace with lock?)
|
||||||
|
|
||||||
EXPORT_C_(uint32) PS2EgetLibType()
|
EXPORT_C_(uint32) PS2EgetLibType()
|
||||||
{
|
{
|
||||||
|
@ -902,18 +902,11 @@ EXPORT_C GSgetLastTag(uint32* tag)
|
||||||
|
|
||||||
EXPORT_C GSgetTitleInfo2(char* dest, size_t length)
|
EXPORT_C GSgetTitleInfo2(char* dest, size_t length)
|
||||||
{
|
{
|
||||||
if (gsopen_done == false) {
|
|
||||||
//printf("GSdx: GSgetTitleInfo but GSOpen not yet done. Ignoring\n");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
string s = "GSdx";
|
string s = "GSdx";
|
||||||
s.append(s_renderer_name).append(s_renderer_type);
|
s.append(s_renderer_name).append(s_renderer_type);
|
||||||
|
|
||||||
// TODO: this gets called from a different thread concurrently with GSOpen (on linux)
|
// TODO: this gets called from a different thread concurrently with GSOpen (on linux)
|
||||||
if(s_gs == NULL) return;
|
if (gsopen_done && s_gs != NULL && s_gs->m_GStitleInfoBuffer[0])
|
||||||
|
|
||||||
if(s_gs->m_GStitleInfoBuffer[0])
|
|
||||||
{
|
{
|
||||||
#ifdef _CX11_
|
#ifdef _CX11_
|
||||||
std::lock_guard<std::mutex> lock(s_gs->m_pGSsetTitle_Crit);
|
std::lock_guard<std::mutex> lock(s_gs->m_pGSsetTitle_Crit);
|
||||||
|
|
Loading…
Reference in New Issue