mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-12-04 20:06:51 +00:00
7e7e9a0452
Removes the windows-specific hack from sceCtrl to read keyboard input and instead add a hack to PPSSPPWindows. The input mapping is still hardcoded and is the same as it was in sceCtrl. Add an std::list to WindowsHost that, curretly, contains a hardcoded list of preferred `InputDevice`s. Devices are tried in-order until one of them reports success. Xinput is preferred over Keyboard. Keyboard always returns success. Pointers are stored in the std::list for polymorphism. Change XinputDevice to report failure as soon as a device can't be queried, instead of only a frame later.
38 lines
731 B
C++
38 lines
731 B
C++
#include "../Core/Host.h"
|
|
#include "InputDevice.h"
|
|
#include <list>
|
|
#include <memory>
|
|
|
|
class WindowsHost : public Host
|
|
{
|
|
public:
|
|
WindowsHost(HWND _displayWindow)
|
|
{
|
|
displayWindow = _displayWindow;
|
|
input = getInputDevices();
|
|
}
|
|
void UpdateMemView();
|
|
void UpdateDisassembly();
|
|
void UpdateUI();
|
|
void SetDebugMode(bool mode);
|
|
|
|
void AddSymbol(std::string name, u32 addr, u32 size, int type);
|
|
|
|
void InitGL();
|
|
void BeginFrame();
|
|
void EndFrame();
|
|
void ShutdownGL();
|
|
|
|
void InitSound(PMixer *mixer);
|
|
void UpdateSound();
|
|
void ShutdownSound();
|
|
|
|
bool IsDebuggingEnabled();
|
|
void BootDone();
|
|
void PrepareShutdown();
|
|
bool AttemptLoadSymbolMap();
|
|
|
|
private:
|
|
HWND displayWindow;
|
|
std::list<std::shared_ptr<InputDevice>> input;
|
|
}; |