Switch to size_t instead of u32.

This commit is contained in:
The Dax 2013-08-05 23:29:59 -04:00
parent 1da0454508
commit b9541d9a15
3 changed files with 5 additions and 3 deletions

View File

@ -781,7 +781,9 @@ int PSPOskDialog::NativeKeyboard()
if(description_text.length() < defaultText_len)
sprintf(windowTitle, description_text.c_str());
if(!InputBox_GetString(0, MainWindow::hwndMain, windowTitle, defaultText, input, FieldMaxLength())) {
size_t maxInputLength = FieldMaxLength();
if(!InputBox_GetString(0, MainWindow::hwndMain, windowTitle, defaultText, input, maxInputLength)) {
sprintf(input, "");
}
#endif

View File

@ -51,7 +51,7 @@ 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)
bool InputBox_GetString(HINSTANCE hInst, HWND hParent, TCHAR *title, TCHAR *defaultvalue, TCHAR *outvalue, size_t outlength)
{
const char *defaultTitle = "Input value";

View File

@ -4,5 +4,5 @@
#include "Common/CommonWindows.h"
bool InputBox_GetString(HINSTANCE hInst, HWND hParent, TCHAR *title, TCHAR *defaultvalue, TCHAR *outvalue);
bool InputBox_GetString(HINSTANCE hInst, HWND hParent, TCHAR *title, TCHAR *defaultvalue, TCHAR *outvalue, u32 outlength);
bool InputBox_GetString(HINSTANCE hInst, HWND hParent, TCHAR *title, TCHAR *defaultvalue, TCHAR *outvalue, size_t outlength);
bool InputBox_GetHex(HINSTANCE hInst, HWND hParent, TCHAR *title, u32 defaultvalue, u32 &outvalue);