mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-02-25 16:41:04 +00:00
Revert "Merge pull request #110 from thedax/master"
This reverts commit d2bdffcc54baa6ce1c42534cc4be952c2b76422f, reversing changes made to 8f0d82ffb72efb7fe138e7d1c83635691ba3f4e7.
This commit is contained in:
parent
d2bdffcc54
commit
d45ea84599
@ -1,6 +1,5 @@
|
||||
#include "input/input_state.h"
|
||||
#include "input/keycodes.h"
|
||||
#include <vector>
|
||||
|
||||
const char *GetDeviceName(int deviceId) {
|
||||
switch (deviceId) {
|
||||
@ -42,22 +41,6 @@ int MapPadButtonFixed(int keycode) {
|
||||
}
|
||||
}
|
||||
|
||||
std::vector<keycode_t> confirmKeys;
|
||||
std::vector<keycode_t> cancelKeys;
|
||||
|
||||
void SetConfirmCancelKeys(std::vector<keycode_t> confirm, std::vector<keycode_t> cancel) {
|
||||
confirmKeys = confirm;
|
||||
cancelKeys = cancel;
|
||||
}
|
||||
|
||||
void AddConfirmKey(keycode_t confirmKey) {
|
||||
confirmKeys.push_back(confirmKey);
|
||||
}
|
||||
|
||||
void AddCancelKey(keycode_t cancelKey) {
|
||||
cancelKeys.push_back(cancelKey);
|
||||
}
|
||||
|
||||
uint32_t ButtonTracker::Update() {
|
||||
pad_buttons_ |= pad_buttons_async_set;
|
||||
pad_buttons_ &= ~pad_buttons_async_clear;
|
||||
|
@ -11,9 +11,7 @@
|
||||
#include "math/lin/vec3.h"
|
||||
#include "base/mutex.h"
|
||||
#include "base/basictypes.h"
|
||||
#include "input/keycodes.h"
|
||||
#include <map>
|
||||
#include <vector>
|
||||
|
||||
// Default device IDs
|
||||
|
||||
@ -114,13 +112,6 @@ private:
|
||||
void UpdateInputState(InputState *input, bool merge = false);
|
||||
void EndInputState(InputState *input);
|
||||
|
||||
// Is there a nicer place for this stuff? It's here to avoid dozens of linking errors in UnitTest..
|
||||
extern std::vector<keycode_t> confirmKeys;
|
||||
extern std::vector<keycode_t> cancelKeys;
|
||||
void SetConfirmCancelKeys(std::vector<keycode_t> confirm, std::vector<keycode_t> cancel);
|
||||
void AddConfirmKey(keycode_t confirmKey);
|
||||
void AddCancelKey(keycode_t confirmKey);
|
||||
|
||||
enum {
|
||||
TOUCH_MOVE = 1,
|
||||
TOUCH_DOWN = 2,
|
||||
|
@ -27,6 +27,7 @@ struct DispatchQueueItem {
|
||||
|
||||
std::queue<DispatchQueueItem> g_dispatchQueue;
|
||||
|
||||
|
||||
void EventTriggered(Event *e, EventParams params) {
|
||||
lock_guard guard(mutex_);
|
||||
|
||||
@ -186,11 +187,11 @@ void Clickable::Touch(const TouchInput &input) {
|
||||
// TODO: O/X confirm preference for xperia play?
|
||||
|
||||
bool IsAcceptKeyCode(int keyCode) {
|
||||
return std::find(confirmKeys.begin(), confirmKeys.end(), (keycode_t)keyCode) != confirmKeys.end();
|
||||
return keyCode == NKCODE_SPACE || keyCode == NKCODE_ENTER || keyCode == NKCODE_Z || keyCode == NKCODE_BUTTON_A || keyCode == NKCODE_BUTTON_CROSS || keyCode == NKCODE_BUTTON_1;
|
||||
}
|
||||
|
||||
bool IsEscapeKeyCode(int keyCode) {
|
||||
return std::find(cancelKeys.begin(), cancelKeys.end(), (keycode_t)keyCode) != cancelKeys.end();
|
||||
return keyCode == NKCODE_ESCAPE || keyCode == NKCODE_BACK || keyCode == NKCODE_BUTTON_CIRCLE || keyCode == NKCODE_BUTTON_B || keyCode == NKCODE_BUTTON_2;
|
||||
}
|
||||
|
||||
void Clickable::Key(const KeyInput &key) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user