GS: finish unicode conversion, fix signature inheritance and non wchar external import

This commit is contained in:
Gauvain 'GovanifY' Roussel-Tarbouriech authored and refractionpcsx2 committed 2021-02-27 20:43:40 +00:00
1 parent 5917029788
commit 8bfe851446
5 files changed
+13 -7

No files matched your search

+1 -1
View File
@@ -197,7 +197,7 @@ GSSource : public CBaseFilter, private CCritSec, public IGSSource
public:
GSSource(int w, int h, float fps, IUnknown* pUnk, HRESULT& hr, int colorspace)
: CBaseFilter(NAME("GSSource"), pUnk, this, __uuidof(this), &hr)
: CBaseFilter("GSSource", pUnk, this, __uuidof(this), &hr)
, m_output(NULL)
, m_size(w, h)
, m_atpf((REFERENCE_TIME)(10000000.0f / fps))
+5 -2
View File
@@ -177,11 +177,14 @@ GSVector4i GSWndDX::GetClientRect()
// Returns FALSE if the window has no title, or if th window title is under the strict
// management of the emulator.
bool GSWndDX::SetWindowText(const wchar_t* title)
bool GSWndDX::SetWindowText(const char* title)
{
if(!m_managed) return false;
::SetWindowText(m_hWnd, title);
const size_t tmp_size = strlen(title) + 1;
std::wstring tmp(tmp_size, L'#');
mbstowcs(&tmp[0], title, tmp_size);
::SetWindowText(m_hWnd, tmp.c_str());
return m_frame;
}
+1 -1
View File
@@ -43,7 +43,7 @@ public:
void* GetDisplay() {return m_hWnd;}
void* GetHandle() {return m_hWnd;}
GSVector4i GetClientRect();
bool SetWindowText(const wchar_t* title);
bool SetWindowText(const char* title);
void Show();
void Hide();
+5 -2
View File
@@ -376,12 +376,15 @@ void GSWndWGL::HideFrame()
// Returns FALSE if the window has no title, or if th window title is under the strict
// management of the emulator.
bool GSWndWGL::SetWindowText(const wchar_t* title)
bool GSWndWGL::SetWindowText(const char* title)
{
if (!m_managed) return false;
const size_t tmp_size = strlen(title) + 1;
std::wstring tmp(tmp_size, L'#');
mbstowcs(&tmp[0], title, tmp_size);
// Used by GSReplay.
::SetWindowText(m_NativeWindow, title);
::SetWindowText(m_NativeWindow, tmp.c_str());
return true;
}
+1 -1
View File
@@ -54,7 +54,7 @@ public:
void* GetDisplay() {return m_NativeWindow;}
void* GetHandle() {return m_NativeWindow;}
GSVector4i GetClientRect();
bool SetWindowText(const wchar_t* title);
bool SetWindowText(const char* title);
void AttachContext();
void DetachContext();