onepad:freebsd: Adjust ifdefs

This commit is contained in:
Jonathan Li 2016-05-01 09:54:53 +01:00
parent a7ba779ba8
commit f963fcfa66
5 changed files with 7 additions and 11 deletions

View File

@ -21,11 +21,7 @@
#pragma once
#include <string.h> // for memset
#ifdef __linux__
#define MAX_KEYS 24
#else
#define MAX_KEYS 20
#endif
enum KeyType
{

View File

@ -28,7 +28,7 @@
#include <gdk/gdkkeysyms.h>
#include "keyboard.h"
#ifndef __linux__
#ifdef _WIN32
char* KeysymToChar(int keysym)
{
LPWORD temp;
@ -40,7 +40,7 @@ char* KeysymToChar(int keysym)
void SetAutoRepeat(bool autorep)
{
#ifdef __linux__
#if defined(__unix__)
if (toggleAutoRepeat)
{
if (autorep)
@ -51,7 +51,7 @@ void SetAutoRepeat(bool autorep)
#endif
}
#ifdef __linux__
#if defined(__unix__)
static bool s_grab_input = false;
static bool s_Shift = false;
static unsigned int s_previous_mouse_x = 0;

View File

@ -24,7 +24,7 @@
#include "onepad.h"
#ifdef __linux__
#if defined(__unix__)
#include "Linux/linux.h"

View File

@ -263,7 +263,7 @@ EXPORT_C_(s32) PADopen(void *pDsp)
pthread_spin_init(&mutex_KeyEvent, PTHREAD_PROCESS_PRIVATE);
mutex_WasInit = true;
#ifdef __linux__
#if defined(__unix__)
GamePad::EnumerateGamePads(s_vgamePad);
#endif
return _PADopen(pDsp);
@ -595,7 +595,7 @@ EXPORT_C_(keyEvent*) PADkeyEvent()
return &s_event;
}
#ifdef __linux__
#if defined(__unix__)
EXPORT_C_(void) PADWriteEvent(keyEvent &evt)
{
// This function call be called before PADopen. Therefore we cann't

View File

@ -49,7 +49,7 @@ using namespace std;
#define PADdefs
#include "PS2Edefs.h"
#ifdef __linux__
#if defined(__unix__)
#include "GamePad.h"
#endif
#include "bitwise.h"