mirror of
https://github.com/MiSTer-devel/InputTest_MiSTer.git
synced 2026-04-19 03:04:18 +00:00
Merge branch 'main' into main
This commit is contained in:
@@ -533,7 +533,7 @@ bool ReadKeyboard()
|
||||
#else
|
||||
m_keyboardState = SDL_GetKeyboardState(&m_keyboardStateCount);
|
||||
if (!m_keyboardState_last) m_keyboardState_last = (Uint8 *)calloc(m_keyboardStateCount,sizeof(Uint8));
|
||||
//fprintf(stderr,"count: %d\n",m_keyboardStateCount);
|
||||
////fprintf(stderr,"count: %d\n",m_keyboardStateCount);
|
||||
#endif
|
||||
|
||||
return true;
|
||||
@@ -618,6 +618,7 @@ void SimInput::CleanUp() {
|
||||
unsigned ps2_key_temp;
|
||||
bool ps2_clock = 1;
|
||||
|
||||
|
||||
void SimInput::BeforeEval()
|
||||
{
|
||||
if (keyEventTimer == 0) {
|
||||
@@ -625,7 +626,7 @@ void SimInput::BeforeEval()
|
||||
if (keyEvents.size() > 0) {
|
||||
// Get chunk from queue
|
||||
SimInput_PS2KeyEvent evt = keyEvents.front();
|
||||
//fprintf(stderr,"evt = %x\n",evt);
|
||||
//fprintf(stderr,"evt = %x\n",evt.code);
|
||||
keyEvents.pop();
|
||||
|
||||
ps2_key_temp = ev2ps2[evt.code];
|
||||
|
||||
@@ -12,11 +12,11 @@
|
||||
|
||||
struct SimInput_PS2KeyEvent {
|
||||
public:
|
||||
char code;
|
||||
unsigned char code;
|
||||
bool pressed;
|
||||
bool extended;
|
||||
|
||||
SimInput_PS2KeyEvent(char code, bool pressed, bool extended) {
|
||||
SimInput_PS2KeyEvent(unsigned char code, bool pressed, bool extended) {
|
||||
this->code = code;
|
||||
this->pressed = pressed;
|
||||
this->extended = extended;
|
||||
|
||||
@@ -173,13 +173,14 @@ int main(int argc, char** argv, char** env) {
|
||||
input.SetMapping(input_right, SDL_SCANCODE_RIGHT);
|
||||
input.SetMapping(input_down, SDL_SCANCODE_DOWN);
|
||||
input.SetMapping(input_left, SDL_SCANCODE_LEFT);
|
||||
input.SetMapping(input_fire1, SDL_SCANCODE_SPACE);
|
||||
input.SetMapping(input_start_1, SDL_SCANCODE_1);
|
||||
input.SetMapping(input_start_2, SDL_SCANCODE_2);
|
||||
input.SetMapping(input_coin_1, SDL_SCANCODE_3);
|
||||
input.SetMapping(input_coin_2, SDL_SCANCODE_4);
|
||||
input.SetMapping(input_coin_3, SDL_SCANCODE_5);
|
||||
input.SetMapping(input_pause, SDL_SCANCODE_P);
|
||||
input.SetMapping(input_a, SDL_SCANCODE_A);
|
||||
input.SetMapping(input_b, SDL_SCANCODE_B);
|
||||
input.SetMapping(input_x, SDL_SCANCODE_X);
|
||||
input.SetMapping(input_y, SDL_SCANCODE_Y);
|
||||
input.SetMapping(input_l, SDL_SCANCODE_L);
|
||||
input.SetMapping(input_r, SDL_SCANCODE_R);
|
||||
input.SetMapping(input_select, SDL_SCANCODE_1);
|
||||
input.SetMapping(input_start, SDL_SCANCODE_2);
|
||||
#endif
|
||||
// Setup video output
|
||||
if (video.Initialise(windowTitle) == 1) { return 1; }
|
||||
|
||||
Reference in New Issue
Block a user