mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-23 13:30:02 +00:00
Fix Headless build error introduced by #3063.
This commit is contained in:
parent
f08dd3eba6
commit
40b1c6298a
@ -27,19 +27,15 @@
|
||||
#include "Common/ChunkFile.h"
|
||||
#include "GPU/GPUState.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
#include "Core/Host.h"
|
||||
#endif
|
||||
|
||||
#ifndef _WIN32
|
||||
#include <ctype.h>
|
||||
#include <math.h>
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
#include "../Windows/InputBox.h"
|
||||
namespace MainWindow {
|
||||
extern HWND hwndMain;
|
||||
HINSTANCE GetHinstance();
|
||||
};
|
||||
#endif
|
||||
|
||||
const int numKeyCols[OSK_KEYBOARD_COUNT] = {12, 12, 13, 13, 12, 12, 12};
|
||||
const int numKeyRows[OSK_KEYBOARD_COUNT] = {4, 4, 5, 5, 5, 4, 4};
|
||||
|
||||
@ -783,10 +779,10 @@ int PSPOskDialog::NativeKeyboard()
|
||||
|
||||
size_t maxInputLength = FieldMaxLength();
|
||||
|
||||
if(!InputBox_GetString(0, MainWindow::hwndMain, windowTitle, defaultText, input, maxInputLength)) {
|
||||
if(host->InputBoxGetString(windowTitle, defaultText, input, maxInputLength)) {
|
||||
strncat(input, "", strlen(""));
|
||||
}
|
||||
// TODO: Insert your platform's native keyboard stuff here...
|
||||
// TODO: Insert your platform's native keyboard stuff here...
|
||||
|
||||
status = SCE_UTILITY_STATUS_FINISHED;
|
||||
}
|
||||
|
@ -65,9 +65,15 @@ public:
|
||||
virtual void SetGPUStep(bool value, int flag = 0, int data = 0) {}
|
||||
virtual void NextGPUStep() {}
|
||||
|
||||
#ifdef _WIN32
|
||||
// Used instead of InputBox_GetString in PSPOskDialog.cpp to bypass the onscreen keyboard.
|
||||
virtual bool InputBoxGetString(char *title, char *defaultValue, char *outValue, size_t outlength) { return false; }
|
||||
#endif
|
||||
|
||||
// Used for headless.
|
||||
virtual void SendDebugOutput(const std::string &output) {}
|
||||
virtual void SendDebugScreenshot(const u8 *pixbuf, u32 w, u32 h) {}
|
||||
|
||||
};
|
||||
|
||||
extern Host *host;
|
||||
|
@ -28,6 +28,7 @@
|
||||
#include "Windows/Debugger/DebuggerShared.h"
|
||||
#include "Windows/Debugger/Debugger_Disasm.h"
|
||||
#include "Windows/Debugger/Debugger_MemoryDlg.h"
|
||||
#include "Windows/InputBox.h"
|
||||
|
||||
#include "Windows/DinputDevice.h"
|
||||
#include "Windows/XinputDevice.h"
|
||||
@ -39,7 +40,6 @@
|
||||
#include "file/file_util.h"
|
||||
#include "main.h"
|
||||
|
||||
|
||||
static PMixer *curMixer;
|
||||
|
||||
int MyMix(short *buffer, int numSamples, int bits, int rate, int channels)
|
||||
@ -255,3 +255,8 @@ void WindowsHost::UpdateConsolePosition()
|
||||
g_Config.iConsoleWindowY = rc.top;
|
||||
}
|
||||
}
|
||||
|
||||
bool WindowsHost::InputBoxGetString(char *title, char *defaultValue, char *outValue, size_t outLength)
|
||||
{
|
||||
return InputBox_GetString(MainWindow::GetHInstance(), MainWindow::GetHWND(), title, defaultValue, outValue, outLength);
|
||||
}
|
@ -52,6 +52,8 @@ public:
|
||||
void SaveSymbolMap();
|
||||
void SetWindowTitle(const char *message);
|
||||
|
||||
bool InputBoxGetString(char *title, char *defaultValue, char *outValue, size_t outlength);
|
||||
|
||||
std::shared_ptr<KeyboardDevice> keyboard;
|
||||
|
||||
private:
|
||||
|
Loading…
Reference in New Issue
Block a user