mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-21 02:09:05 +02:00
Fix crash in InputBox.cpp by offering an overloaded func which takes a size, and use it in MenuScreens.cpp / PSPOskDialog.cpp.
This commit is contained in:
1 parent
d20ac3c4c2
commit
4570d83c05
4 files changed
+28
-6
No files matched your search
@@ -49,6 +49,22 @@ bool InputBox_GetString(HINSTANCE hInst, HWND hParent, TCHAR *title, TCHAR *defa
|
||||
return false;
|
||||
}
|
||||
|
||||
bool InputBox_GetString(HINSTANCE hInst, HWND hParent, TCHAR *title, TCHAR *defaultvalue, TCHAR *outvalue, u32 outlength)
|
||||
{
|
||||
if (defaultvalue && strlen(defaultvalue)<255)
|
||||
strcpy(textBoxContents,defaultvalue);
|
||||
else
|
||||
strcpy(textBoxContents,"");
|
||||
|
||||
if (IDOK==DialogBox(hInst,(LPCSTR)IDD_INPUTBOX,hParent,InputBoxFunc))
|
||||
{
|
||||
strncpy(outvalue, out, outlength);
|
||||
return true;
|
||||
}
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
bool InputBox_GetHex(HINSTANCE hInst, HWND hParent, TCHAR *title, u32 defaultvalue, u32 &outvalue)
|
||||
{
|
||||
sprintf(textBoxContents,"%08x",defaultvalue);
|
||||
|
||||
Reference in new issue
Block a user