Added keyboard QT to SDL2 key conversion functionality.

This commit is contained in:
Matthew Budd 2020-06-24 21:57:43 -04:00
parent f53bbc8cde
commit d6ff002af0
8 changed files with 1331 additions and 310 deletions

308
fceux.pro Normal file
View File

@ -0,0 +1,308 @@
######################################################################
# Automatically generated by qmake (3.1) Sat Jun 20 21:20:47 2020
######################################################################
TEMPLATE = app
TARGET = fceux
INCLUDEPATH += .
# The following define makes your compiler warn you if you use any
# feature of Qt which has been marked as deprecated (the exact warnings
# depend on your compiler). Please consult the documentation of the
# deprecated API in order to know how to port your code away from it.
DEFINES += QT_DEPRECATED_WARNINGS
# You can also make your code fail to compile if you use deprecated APIs.
# In order to do so, uncomment the following line.
# You can also select to disable deprecated APIs only up to a certain version of Qt.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
QT += widgets
CONFIG += object_parallel_to_source
unix {
QT_CONFIG -= no-pkg-config
CONFIG += link_pkgconfig
QMAKE_CXXFLAGS += -DPSS_STYLE=1 -DHAVE_ASPRINTF
packagesExist(minizip){
PKGCONFIG += minizip
QMAKE_CXXFLAGS += -D_SYSTEM_MINIZIP
}
packagesExist(zlib){
PKGCONFIG += zlib
}
PKGCONFIG += sdl2
packagesExist(lua-5.1){
PKGCONFIG += lua-5.1
QMAKE_CXXFLAGS += -D_S9XLUA_H
}
QMAKE_CXXFLAGS -= -O2
QMAKE_CXXFLAGS += -O0 -g3 -Wall -Wno-write-strings -Wno-sign-compare -Wno-parentheses -Wno-unused-local-typedefs
QMAKE_CXXFLAGS_RELEASE -= -O2
}
# Input
SOURCES += src/asm.cpp
SOURCES += src/cart.cpp
SOURCES += src/cheat.cpp
SOURCES += src/conddebug.cpp
SOURCES += src/config.cpp
SOURCES += src/debug.cpp
SOURCES += src/drawing.cpp
SOURCES += src/fceu.cpp
SOURCES += src/fds.cpp
SOURCES += src/file.cpp
SOURCES += src/emufile.cpp
SOURCES += src/filter.cpp
SOURCES += src/ines.cpp
SOURCES += src/input.cpp
SOURCES += src/movie.cpp
SOURCES += src/netplay.cpp
SOURCES += src/nsf.cpp
SOURCES += src/oldmovie.cpp
SOURCES += src/palette.cpp
SOURCES += src/ppu.cpp
SOURCES += src/sound.cpp
SOURCES += src/state.cpp
SOURCES += src/unif.cpp
SOURCES += src/video.cpp
SOURCES += src/vsuni.cpp
SOURCES += src/wave.cpp
SOURCES += src/x6502.cpp
unix {
packagesExist(lua-5.1){
SOURCES += src/lua-engine.cpp
}
}
SOURCES += src/boards/01-222.cpp
SOURCES += src/boards/09-034a.cpp
SOURCES += src/boards/103.cpp
SOURCES += src/boards/106.cpp
SOURCES += src/boards/108.cpp
SOURCES += src/boards/112.cpp
SOURCES += src/boards/116.cpp
SOURCES += src/boards/117.cpp
SOURCES += src/boards/120.cpp
SOURCES += src/boards/121.cpp
SOURCES += src/boards/12in1.cpp
SOURCES += src/boards/151.cpp
SOURCES += src/boards/156.cpp
SOURCES += src/boards/158B.cpp
SOURCES += src/boards/15.cpp
SOURCES += src/boards/164.cpp
SOURCES += src/boards/168.cpp
SOURCES += src/boards/170.cpp
SOURCES += src/boards/175.cpp
SOURCES += src/boards/176.cpp
SOURCES += src/boards/177.cpp
SOURCES += src/boards/178.cpp
SOURCES += src/boards/183.cpp
SOURCES += src/boards/185.cpp
SOURCES += src/boards/186.cpp
SOURCES += src/boards/187.cpp
SOURCES += src/boards/189.cpp
SOURCES += src/boards/18.cpp
SOURCES += src/boards/190.cpp
SOURCES += src/boards/193.cpp
SOURCES += src/boards/199.cpp
SOURCES += src/boards/206.cpp
SOURCES += src/boards/208.cpp
SOURCES += src/boards/222.cpp
SOURCES += src/boards/225.cpp
SOURCES += src/boards/228.cpp
SOURCES += src/boards/230.cpp
SOURCES += src/boards/232.cpp
SOURCES += src/boards/234.cpp
SOURCES += src/boards/235.cpp
SOURCES += src/boards/244.cpp
SOURCES += src/boards/246.cpp
SOURCES += src/boards/252.cpp
SOURCES += src/boards/253.cpp
SOURCES += src/boards/28.cpp
SOURCES += src/boards/32.cpp
SOURCES += src/boards/33.cpp
SOURCES += src/boards/34.cpp
SOURCES += src/boards/36.cpp
SOURCES += src/boards/3d-block.cpp
SOURCES += src/boards/40.cpp
SOURCES += src/boards/411120-c.cpp
SOURCES += src/boards/41.cpp
SOURCES += src/boards/42.cpp
SOURCES += src/boards/43.cpp
SOURCES += src/boards/46.cpp
SOURCES += src/boards/50.cpp
SOURCES += src/boards/51.cpp
SOURCES += src/boards/57.cpp
SOURCES += src/boards/603-5052.cpp
SOURCES += src/boards/62.cpp
SOURCES += src/boards/65.cpp
SOURCES += src/boards/67.cpp
SOURCES += src/boards/68.cpp
SOURCES += src/boards/69.cpp
SOURCES += src/boards/71.cpp
SOURCES += src/boards/72.cpp
SOURCES += src/boards/77.cpp
SOURCES += src/boards/79.cpp
SOURCES += src/boards/80013-B.cpp
SOURCES += src/boards/80.cpp
SOURCES += src/boards/8157.cpp
SOURCES += src/boards/8237.cpp
SOURCES += src/boards/82.cpp
SOURCES += src/boards/830118C.cpp
SOURCES += src/boards/88.cpp
SOURCES += src/boards/8in1.cpp
SOURCES += src/boards/90.cpp
SOURCES += src/boards/91.cpp
SOURCES += src/boards/96.cpp
SOURCES += src/boards/99.cpp
SOURCES += src/boards/a9746.cpp
SOURCES += src/boards/ac-08.cpp
SOURCES += src/boards/addrlatch.cpp
SOURCES += src/boards/ax5705.cpp
SOURCES += src/boards/bandai.cpp
SOURCES += src/boards/bb.cpp
SOURCES += src/boards/bmc13in1jy110.cpp
SOURCES += src/boards/bmc42in1r.cpp
SOURCES += src/boards/bmc64in1nr.cpp
SOURCES += src/boards/bmc70in1.cpp
SOURCES += src/boards/BMW8544.cpp
SOURCES += src/boards/bonza.cpp
SOURCES += src/boards/bs-5.cpp
SOURCES += src/boards/cheapocabra.cpp
SOURCES += src/boards/cityfighter.cpp
SOURCES += src/boards/coolboy.cpp
SOURCES += src/boards/dance2000.cpp
SOURCES += src/boards/datalatch.cpp
SOURCES += src/boards/dream.cpp
SOURCES += src/boards/__dummy_mapper.cpp
SOURCES += src/boards/edu2000.cpp
SOURCES += src/boards/eh8813a.cpp
SOURCES += src/boards/emu2413.c
SOURCES += src/boards/et-100.cpp
SOURCES += src/boards/et-4320.cpp
SOURCES += src/boards/F-15.cpp
SOURCES += src/boards/famicombox.cpp
SOURCES += src/boards/ffe.cpp
SOURCES += src/boards/fk23c.cpp
SOURCES += src/boards/fns.cpp
SOURCES += src/boards/ghostbusters63in1.cpp
SOURCES += src/boards/gs-2004.cpp
SOURCES += src/boards/gs-2013.cpp
SOURCES += src/boards/h2288.cpp
SOURCES += src/boards/hp10xx_hp20xx.cpp
SOURCES += src/boards/hp898f.cpp
SOURCES += src/boards/inlnsf.cpp
SOURCES += src/boards/karaoke.cpp
SOURCES += src/boards/kof97.cpp
SOURCES += src/boards/ks7010.cpp
SOURCES += src/boards/ks7012.cpp
SOURCES += src/boards/ks7013.cpp
SOURCES += src/boards/ks7016.cpp
SOURCES += src/boards/ks7017.cpp
SOURCES += src/boards/ks7030.cpp
SOURCES += src/boards/ks7031.cpp
SOURCES += src/boards/ks7032.cpp
SOURCES += src/boards/ks7037.cpp
SOURCES += src/boards/ks7057.cpp
SOURCES += src/boards/le05.cpp
SOURCES += src/boards/lh32.cpp
SOURCES += src/boards/lh53.cpp
SOURCES += src/boards/malee.cpp
SOURCES += src/boards/mihunche.cpp
SOURCES += src/boards/mmc1.cpp
SOURCES += src/boards/mmc2and4.cpp
SOURCES += src/boards/mmc3.cpp
SOURCES += src/boards/mmc5.cpp
SOURCES += src/boards/n106.cpp
SOURCES += src/boards/n625092.cpp
SOURCES += src/boards/novel.cpp
SOURCES += src/boards/onebus.cpp
SOURCES += src/boards/pec-586.cpp
SOURCES += src/boards/rt-01.cpp
SOURCES += src/boards/sa-9602b.cpp
SOURCES += src/boards/sachen.cpp
SOURCES += src/boards/sb-2000.cpp
SOURCES += src/boards/sc-127.cpp
SOURCES += src/boards/sheroes.cpp
SOURCES += src/boards/sl1632.cpp
SOURCES += src/boards/subor.cpp
SOURCES += src/boards/super24.cpp
SOURCES += src/boards/supervision.cpp
SOURCES += src/boards/t-227-1.cpp
SOURCES += src/boards/t-262.cpp
SOURCES += src/boards/tengen.cpp
SOURCES += src/boards/tf-1201.cpp
SOURCES += src/boards/transformer.cpp
SOURCES += src/boards/unrom512.cpp
SOURCES += src/boards/vrc1.cpp
SOURCES += src/boards/vrc2and4.cpp
SOURCES += src/boards/vrc3.cpp
SOURCES += src/boards/vrc5.cpp
SOURCES += src/boards/vrc6.cpp
SOURCES += src/boards/vrc7.cpp
SOURCES += src/boards/vrc7p.cpp
SOURCES += src/boards/yoko.cpp
SOURCES += src/input/arkanoid.cpp
SOURCES += src/input/bworld.cpp
SOURCES += src/input/cursor.cpp
SOURCES += src/input/fkb.cpp
SOURCES += src/input/fns.cpp
SOURCES += src/input/ftrainer.cpp
SOURCES += src/input/hypershot.cpp
SOURCES += src/input/mahjong.cpp
SOURCES += src/input/mouse.cpp
SOURCES += src/input/oekakids.cpp
SOURCES += src/input/pec586kb.cpp
SOURCES += src/input/powerpad.cpp
SOURCES += src/input/quiz.cpp
SOURCES += src/input/shadow.cpp
SOURCES += src/input/snesmouse.cpp
SOURCES += src/input/suborkb.cpp
SOURCES += src/input/toprider.cpp
SOURCES += src/input/virtualboy.cpp
SOURCES += src/input/zapper.cpp
SOURCES += src/utils/backward.cpp
SOURCES += src/utils/ConvertUTF.c
SOURCES += src/utils/xstring.cpp
SOURCES += src/utils/crc32.cpp
SOURCES += src/utils/endian.cpp
SOURCES += src/utils/general.cpp
SOURCES += src/utils/guid.cpp
SOURCES += src/utils/md5.cpp
SOURCES += src/utils/memory.cpp
SOURCES += src/drivers/common/args.cpp
SOURCES += src/drivers/common/cheat.cpp
SOURCES += src/drivers/common/config.cpp
SOURCES += src/drivers/common/configSys.cpp
SOURCES += src/drivers/common/hq2x.cpp
SOURCES += src/drivers/common/hq3x.cpp
SOURCES += src/drivers/common/scale2x.cpp
SOURCES += src/drivers/common/scale3x.cpp
SOURCES += src/drivers/common/scalebit.cpp
SOURCES += src/drivers/common/vidblit.cpp
SOURCES += src/drivers/common/nes_ntsc.c
HEADERS += src/drivers/Qt/GameApp.h
HEADERS += src/drivers/Qt/GameViewer.h
SOURCES += src/drivers/Qt/main.cpp
SOURCES += src/drivers/Qt/GameApp.cpp
SOURCES += src/drivers/Qt/GameViewer.cpp
SOURCES += src/drivers/Qt/fceuWrapper.cpp
SOURCES += src/drivers/Qt/config.cpp
SOURCES += src/drivers/Qt/input.cpp
SOURCES += src/drivers/Qt/gl_win.cpp
SOURCES += src/drivers/Qt/keyscan.cpp
SOURCES += src/drivers/Qt/sdl-sound.cpp
SOURCES += src/drivers/Qt/sdl-video.cpp
SOURCES += src/drivers/Qt/sdl-joystick.cpp
SOURCES += src/drivers/Qt/sdl-throttle.cpp
SOURCES += src/drivers/Qt/unix-netplay.cpp

View File

@ -2,6 +2,7 @@
//
#include "GameApp.h"
#include "fceuWrapper.h"
#include "keyscan.h"
gameWin_t::gameWin_t(QWidget *parent)
: QMainWindow( parent )
@ -37,6 +38,18 @@ gameWin_t::~gameWin_t(void)
delete viewport;
}
void gameWin_t::keyPressEvent(QKeyEvent *event)
{
//printf("Key Press: 0x%x \n", event->key() );
pushKeyEvent( event, 1 );
}
void gameWin_t::keyReleaseEvent(QKeyEvent *event)
{
//printf("Key Release: 0x%x \n", event->key() );
pushKeyEvent( event, 0 );
}
void gameWin_t::createMainMenu(void)
{
menuBar()->setNativeMenuBar(false);

View File

@ -12,6 +12,7 @@
#include <QMenuBar>
#include <QVBoxLayout>
#include <QHBoxLayout>
#include <QKeyEvent>
#include <QTimer>
#include "GameViewer.h"
@ -37,6 +38,10 @@ class gameWin_t : public QMainWindow
QTimer *gameTimer;
protected:
void keyPressEvent(QKeyEvent *event);
void keyReleaseEvent(QKeyEvent *event);
private:
void createMainMenu(void);

View File

@ -282,6 +282,13 @@ int fceuWrapperInit( int argc, char *argv[] )
FCEUD_Message("Starting " FCEU_NAME_AND_VERSION "...\n");
/* SDL_INIT_VIDEO Needed for (joystick config) event processing? */
if (SDL_Init(SDL_INIT_VIDEO))
{
printf("Could not initialize SDL: %s.\n", SDL_GetError());
return(-1);
}
// Initialize the configuration system
g_config = InitConfig();

View File

@ -1043,7 +1043,7 @@ DTestButton (ButtConfig * bc)
ButtConfig GamePadConfig[4][10] = {
/* Gamepad 1 */
{MK (KP_3), MK (KP_2), MK (SLASH), MK (ENTER),
MK (W), MK (Z), MK (A), MK (S), MKZ (), MKZ ()},
MK (w), MK (z), MK (a), MK (s), MKZ (), MKZ ()},
/* Gamepad 2 */
GPZ (),
@ -2259,7 +2259,7 @@ const char *GamePadNames[GAMEPAD_NUM_BUTTONS] = { "A", "B", "Select", "Start",
const char *DefaultGamePadDevice[GAMEPAD_NUM_DEVICES] =
{ "Keyboard", "None", "None", "None" };
const int DefaultGamePad[GAMEPAD_NUM_DEVICES][GAMEPAD_NUM_BUTTONS] =
{ {SDLK_F, SDLK_D, SDLK_S, SDLK_RETURN,
{ {SDLK_f, SDLK_d, SDLK_s, SDLK_RETURN,
SDLK_UP, SDLK_DOWN, SDLK_LEFT, SDLK_RIGHT, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

985
src/drivers/Qt/keyscan.cpp Normal file
View File

@ -0,0 +1,985 @@
// keyscan.cpp
//
#include <QtCore>
#include <SDL2/SDL.h>
#include "keyscan.h"
using namespace Qt;
SDL_Scancode convQtKey2SDLScanCode( Qt::Key q )
{
SDL_Scancode s = SDL_SCANCODE_UNKNOWN;
switch (q)
{
case Key_Escape:
s = SDL_SCANCODE_ESCAPE;
break;
case Key_Tab:
case Key_Backtab:
s = SDL_SCANCODE_TAB;
break;
case Key_Backspace:
s = SDL_SCANCODE_BACKSPACE;
break;
case Key_Return:
s = SDL_SCANCODE_RETURN;
break;
case Key_Enter:
s = SDL_SCANCODE_RETURN;
break;
case Key_Insert:
s = SDL_SCANCODE_INSERT;
break;
case Key_Delete:
s = SDL_SCANCODE_DELETE;
break;
case Key_Pause:
s = SDL_SCANCODE_PAUSE;
break;
case Key_Print:
case Key_SysReq:
s = SDL_SCANCODE_PRINTSCREEN;
break;
case Key_Clear:
s = SDL_SCANCODE_CLEAR;
break;
case Key_Home:
s = SDL_SCANCODE_HOME;
break;
case Key_End:
s = SDL_SCANCODE_END;
break;
case Key_Left:
s = SDL_SCANCODE_LEFT;
break;
case Key_Up:
s = SDL_SCANCODE_UP;
break;
case Key_Right:
s = SDL_SCANCODE_RIGHT;
break;
case Key_Down:
s = SDL_SCANCODE_DOWN;
break;
case Key_PageUp:
s = SDL_SCANCODE_PAGEUP;
break;
case Key_PageDown:
s = SDL_SCANCODE_PAGEDOWN;
break;
case Key_Shift:
s = SDL_SCANCODE_LSHIFT;
break;
case Key_Control:
s = SDL_SCANCODE_LCTRL;
break;
case Key_Meta:
s = SDL_SCANCODE_LGUI;
break;
case Key_Alt:
s = SDL_SCANCODE_LALT;
break;
case Key_CapsLock:
s = SDL_SCANCODE_CAPSLOCK;
break;
case Key_NumLock:
s = SDL_SCANCODE_NUMLOCKCLEAR;
break;
case Key_ScrollLock:
s = SDL_SCANCODE_SCROLLLOCK;
break;
case Key_F1:
s = SDL_SCANCODE_F1;
break;
case Key_F2:
s = SDL_SCANCODE_F2;
break;
case Key_F3:
s = SDL_SCANCODE_F3;
break;
case Key_F4:
s = SDL_SCANCODE_F4;
break;
case Key_F5:
s = SDL_SCANCODE_F5;
break;
case Key_F6:
s = SDL_SCANCODE_F6;
break;
case Key_F7:
s = SDL_SCANCODE_F7;
break;
case Key_F8:
s = SDL_SCANCODE_F8;
break;
case Key_F9:
s = SDL_SCANCODE_F9;
break;
case Key_F10:
s = SDL_SCANCODE_F10;
break;
case Key_F11:
s = SDL_SCANCODE_F11;
break;
case Key_F12:
s = SDL_SCANCODE_F12;
break;
case Key_F13:
s = SDL_SCANCODE_F13;
break;
case Key_F14:
s = SDL_SCANCODE_F14;
break;
case Key_F15:
s = SDL_SCANCODE_F15;
break;
case Key_F16:
s = SDL_SCANCODE_F16;
break;
case Key_F17:
s = SDL_SCANCODE_F17;
break;
case Key_F18:
s = SDL_SCANCODE_F18;
break;
case Key_F19:
s = SDL_SCANCODE_F19;
break;
case Key_F20:
s = SDL_SCANCODE_F20;
break;
case Key_F21:
s = SDL_SCANCODE_F21;
break;
case Key_F22:
s = SDL_SCANCODE_F22;
break;
case Key_F23:
s = SDL_SCANCODE_F23;
break;
case Key_F24:
s = SDL_SCANCODE_F24;
break;
//case Key_F25: // F25 .. F35 only on X11
//case Key_F26:
//case Key_F27:
//case Key_F28:
//case Key_F29:
//case Key_F30:
//case Key_F31:
//case Key_F32:
//case Key_F33:
//case Key_F34:
//case Key_F35:
// s = SDL_SCANCODE_UNKNOWN;
//break;
case Key_Super_L:
case Key_Super_R:
s = SDL_SCANCODE_UNKNOWN;
break;
case Key_Menu:
s = SDL_SCANCODE_MENU;
break;
case Key_Hyper_L:
case Key_Hyper_R:
s = SDL_SCANCODE_UNKNOWN;
break;
case Key_Help:
s = SDL_SCANCODE_HELP;
break;
case Key_Direction_L:
case Key_Direction_R:
s = SDL_SCANCODE_UNKNOWN;
break;
case Key_Space:
//case Key_Any:
s = SDL_SCANCODE_SPACE;
break;
case Key_Exclam:
s = SDL_SCANCODE_1;
break;
case Key_QuoteDbl:
s = SDL_SCANCODE_APOSTROPHE;
break;
case Key_NumberSign:
s = SDL_SCANCODE_3;
break;
case Key_Dollar:
s = SDL_SCANCODE_4;
break;
case Key_Percent:
s = SDL_SCANCODE_5;
break;
case Key_Ampersand:
s = SDL_SCANCODE_7;
break;
case Key_Apostrophe:
s = SDL_SCANCODE_APOSTROPHE;
break;
case Key_ParenLeft:
s = SDL_SCANCODE_9;
break;
case Key_ParenRight:
s = SDL_SCANCODE_0;
break;
case Key_Asterisk:
s = SDL_SCANCODE_8;
break;
case Key_Plus:
s = SDL_SCANCODE_EQUALS;
break;
case Key_Comma:
s = SDL_SCANCODE_COMMA;
break;
case Key_Minus:
s = SDL_SCANCODE_MINUS;
break;
case Key_Period:
s = SDL_SCANCODE_PERIOD;
break;
case Key_Slash:
s = SDL_SCANCODE_SLASH;
break;
case Key_0:
s = SDL_SCANCODE_0;
break;
case Key_1:
s = SDL_SCANCODE_1;
break;
case Key_2:
s = SDL_SCANCODE_2;
break;
case Key_3:
s = SDL_SCANCODE_3;
break;
case Key_4:
s = SDL_SCANCODE_4;
break;
case Key_5:
s = SDL_SCANCODE_5;
break;
case Key_6:
s = SDL_SCANCODE_6;
break;
case Key_7:
s = SDL_SCANCODE_7;
break;
case Key_8:
s = SDL_SCANCODE_8;
break;
case Key_9:
s = SDL_SCANCODE_9;
break;
case Key_Colon:
case Key_Semicolon:
s = SDL_SCANCODE_SEMICOLON;
break;
case Key_Less:
s = SDL_SCANCODE_COMMA;
break;
case Key_Equal:
s = SDL_SCANCODE_EQUALS;
break;
case Key_Greater:
s = SDL_SCANCODE_PERIOD;
break;
case Key_Question:
s = SDL_SCANCODE_SLASH;
break;
case Key_At:
s = SDL_SCANCODE_2;
break;
break;
case Key_A:
s = SDL_SCANCODE_A;
break;
case Key_B:
s = SDL_SCANCODE_B;
break;
case Key_C:
s = SDL_SCANCODE_C;
break;
case Key_D:
s = SDL_SCANCODE_D;
break;
case Key_E:
s = SDL_SCANCODE_E;
break;
case Key_F:
s = SDL_SCANCODE_F;
break;
case Key_G:
s = SDL_SCANCODE_G;
break;
case Key_H:
s = SDL_SCANCODE_H;
break;
case Key_I:
s = SDL_SCANCODE_I;
break;
case Key_J:
s = SDL_SCANCODE_J;
break;
case Key_K:
s = SDL_SCANCODE_K;
break;
case Key_L:
s = SDL_SCANCODE_L;
break;
case Key_M:
s = SDL_SCANCODE_M;
break;
case Key_N:
s = SDL_SCANCODE_N;
break;
case Key_O:
s = SDL_SCANCODE_O;
break;
case Key_P:
s = SDL_SCANCODE_P;
break;
case Key_Q:
s = SDL_SCANCODE_Q;
break;
case Key_R:
s = SDL_SCANCODE_R;
break;
case Key_S:
s = SDL_SCANCODE_S;
break;
case Key_T:
s = SDL_SCANCODE_T;
break;
case Key_U:
s = SDL_SCANCODE_U;
break;
case Key_V:
s = SDL_SCANCODE_V;
break;
case Key_W:
s = SDL_SCANCODE_W;
break;
case Key_X:
s = SDL_SCANCODE_X;
break;
case Key_Y:
s = SDL_SCANCODE_Y;
break;
case Key_Z:
s = SDL_SCANCODE_Z;
break;
case Key_BracketLeft:
s = SDL_SCANCODE_LEFTBRACKET;
break;
case Key_Backslash:
s = SDL_SCANCODE_BACKSLASH;
break;
case Key_BracketRight:
s = SDL_SCANCODE_RIGHTBRACKET;
break;
//case Key_AsciiCircum:
// s = SDL_SCANCODE_UNKNOWN;
//break;
case Key_Underscore:
s = SDL_SCANCODE_MINUS;
break;
case Key_QuoteLeft:
s = SDL_SCANCODE_GRAVE;
break;
case Key_BraceLeft:
s = SDL_SCANCODE_LEFTBRACKET;
break;
case Key_Bar:
s = SDL_SCANCODE_BACKSLASH;
break;
case Key_BraceRight:
s = SDL_SCANCODE_RIGHTBRACKET;
break;
case Key_AsciiTilde:
s = SDL_SCANCODE_GRAVE;
break;
//case Key_nobreakspace:
//case Key_exclamdown:
//case Key_cent:
//case Key_sterling:
//case Key_currency:
//case Key_yen:
//case Key_brokenbar:
//case Key_section:
//case Key_diaeresis:
//case Key_copyright:
//case Key_ordfeminine:
//case Key_guillemotleft:
//case Key_notsign:
//case Key_hyphen:
//case Key_registered:
//case Key_macron:
//case Key_degree:
//case Key_plusminus:
//case Key_twosuperior:
//case Key_threesuperior:
//case Key_acute:
//case Key_mu:
//case Key_paragraph:
//case Key_periodcentered:
//case Key_cedilla:
//case Key_onesuperior:
//case Key_masculine:
//case Key_guillemotright:
//case Key_onequarter:
//case Key_onehalf:
//case Key_threequarters:
//case Key_questiondown:
//case Key_Agrave:
//case Key_Aacute:
//case Key_Acircumflex:
//case Key_Atilde:
//case Key_Adiaeresis:
//case Key_Aring:
//case Key_AE:
//case Key_Ccedilla:
//case Key_Egrave:
//case Key_Eacute:
//case Key_Ecircumflex:
//case Key_Ediaeresis:
//case Key_Igrave:
//case Key_Iacute:
//case Key_Icircumflex:
//case Key_Idiaeresis:
//case Key_ETH:
//case Key_Ntilde:
//case Key_Ograve:
//case Key_Oacute:
//case Key_Ocircumflex:
//case Key_Otilde:
//case Key_Odiaeresis:
//case Key_multiply:
//case Key_Ooblique:
//case Key_Ugrave:
//case Key_Uacute:
//case Key_Ucircumflex:
//case Key_Udiaeresis:
//case Key_Yacute:
//case Key_THORN:
//case Key_ssharp:
//case Key_division:
//case Key_ydiaeresis:
// s = SDL_SCANCODE_UNKNOWN;
//break;
default:
s = SDL_SCANCODE_UNKNOWN;
break;
}
return s;
}
SDL_Keycode convQtKey2SDLKeyCode( Qt::Key q )
{
SDL_Keycode s = SDLK_UNKNOWN;
switch (q)
{
case Key_Escape:
s = SDLK_ESCAPE;
break;
case Key_Tab:
case Key_Backtab:
s = SDLK_TAB;
break;
case Key_Backspace:
s = SDLK_BACKSPACE;
break;
case Key_Return:
s = SDLK_RETURN;
break;
case Key_Enter:
s = SDLK_KP_ENTER;
break;
case Key_Insert:
s = SDLK_INSERT;
break;
case Key_Delete:
s = SDLK_DELETE;
break;
case Key_Pause:
s = SDLK_PAUSE;
break;
case Key_Print:
s = SDLK_PRINTSCREEN;
break;
case Key_SysReq:
s = SDLK_SYSREQ;
break;
case Key_Clear:
s = SDLK_CLEAR;
break;
case Key_Home:
s = SDLK_HOME;
break;
case Key_End:
s = SDLK_END;
break;
case Key_Left:
s = SDLK_LEFT;
break;
case Key_Up:
s = SDLK_UP;
break;
case Key_Right:
s = SDLK_RIGHT;
break;
case Key_Down:
s = SDLK_DOWN;
break;
case Key_PageUp:
s = SDLK_PAGEUP;
break;
case Key_PageDown:
s = SDLK_PAGEDOWN;
break;
case Key_Shift:
s = SDLK_LSHIFT;
break;
case Key_Control:
s = SDLK_LCTRL;
break;
case Key_Meta:
s = SDLK_LGUI;
break;
case Key_Alt:
s = SDL_SCANCODE_LALT;
break;
case Key_CapsLock:
s = SDLK_LALT;
break;
case Key_NumLock:
s = SDLK_NUMLOCKCLEAR;
break;
case Key_ScrollLock:
s = SDLK_SCROLLLOCK;
break;
case Key_F1:
s = SDLK_F1;
break;
case Key_F2:
s = SDLK_F2;
break;
case Key_F3:
s = SDLK_F3;
break;
case Key_F4:
s = SDLK_F4;
break;
case Key_F5:
s = SDLK_F5;
break;
case Key_F6:
s = SDLK_F6;
break;
case Key_F7:
s = SDLK_F7;
break;
case Key_F8:
s = SDLK_F8;
break;
case Key_F9:
s = SDLK_F9;
break;
case Key_F10:
s = SDLK_F10;
break;
case Key_F11:
s = SDLK_F11;
break;
case Key_F12:
s = SDLK_F12;
break;
case Key_F13:
s = SDLK_F13;
break;
case Key_F14:
s = SDLK_F14;
break;
case Key_F15:
s = SDLK_F15;
break;
case Key_F16:
s = SDLK_F16;
break;
case Key_F17:
s = SDLK_F17;
break;
case Key_F18:
s = SDLK_F18;
break;
case Key_F19:
s = SDLK_F19;
break;
case Key_F20:
s = SDLK_F20;
break;
case Key_F21:
s = SDLK_F21;
break;
case Key_F22:
s = SDLK_F22;
break;
case Key_F23:
s = SDLK_F23;
break;
case Key_F24:
s = SDLK_F24;
break;
//case Key_F25: // F25 .. F35 only on X11
//case Key_F26:
//case Key_F27:
//case Key_F28:
//case Key_F29:
//case Key_F30:
//case Key_F31:
//case Key_F32:
//case Key_F33:
//case Key_F34:
//case Key_F35:
// s = SDL_SCANCODE_UNKNOWN;
//break;
case Key_Super_L:
case Key_Super_R:
s = SDLK_UNKNOWN;
break;
case Key_Menu:
s = SDLK_MENU;
break;
case Key_Hyper_L:
case Key_Hyper_R:
s = SDLK_UNKNOWN;
break;
case Key_Help:
s = SDLK_HELP;
break;
case Key_Direction_L:
case Key_Direction_R:
s = SDLK_UNKNOWN;
break;
case Key_Space:
//case Key_Any:
s = SDLK_SPACE;
break;
case Key_Exclam:
s = SDLK_EXCLAIM;
break;
case Key_QuoteDbl:
s = SDLK_QUOTEDBL;
break;
case Key_NumberSign:
s = SDLK_HASH;
break;
case Key_Dollar:
s = SDLK_DOLLAR;
break;
case Key_Percent:
s = SDLK_PERCENT;
break;
case Key_Ampersand:
s = SDLK_AMPERSAND;
break;
case Key_Apostrophe:
s = SDLK_QUOTE;
break;
case Key_ParenLeft:
s = SDLK_LEFTPAREN;
break;
case Key_ParenRight:
s = SDLK_RIGHTPAREN;
break;
case Key_Asterisk:
s = SDLK_ASTERISK;
break;
case Key_Plus:
s = SDLK_PLUS;
break;
case Key_Comma:
s = SDLK_COMMA;
break;
case Key_Minus:
s = SDLK_MINUS;
break;
case Key_Period:
s = SDLK_PERIOD;
break;
case Key_Slash:
s = SDLK_SLASH;
break;
case Key_0:
s = SDLK_0;
break;
case Key_1:
s = SDLK_1;
break;
case Key_2:
s = SDLK_2;
break;
case Key_3:
s = SDLK_3;
break;
case Key_4:
s = SDLK_4;
break;
case Key_5:
s = SDLK_5;
break;
case Key_6:
s = SDLK_6;
break;
case Key_7:
s = SDLK_7;
break;
case Key_8:
s = SDLK_8;
break;
case Key_9:
s = SDLK_9;
break;
case Key_Colon:
s = SDLK_COLON;
break;
case Key_Semicolon:
s = SDLK_SEMICOLON;
break;
case Key_Less:
s = SDLK_LESS;
break;
case Key_Equal:
s = SDLK_LESS;
break;
case Key_Greater:
s = SDLK_GREATER;
break;
case Key_Question:
s = SDLK_QUESTION;
break;
case Key_At:
s = SDLK_AT;
break;
break;
case Key_A:
s = SDLK_a;
break;
case Key_B:
s = SDLK_b;
break;
case Key_C:
s = SDLK_c;
break;
case Key_D:
s = SDLK_d;
break;
case Key_E:
s = SDLK_e;
break;
case Key_F:
s = SDLK_f;
break;
case Key_G:
s = SDLK_g;
break;
case Key_H:
s = SDLK_h;
break;
case Key_I:
s = SDLK_i;
break;
case Key_J:
s = SDLK_j;
break;
case Key_K:
s = SDLK_k;
break;
case Key_L:
s = SDLK_l;
break;
case Key_M:
s = SDLK_m;
break;
case Key_N:
s = SDLK_n;
break;
case Key_O:
s = SDLK_o;
break;
case Key_P:
s = SDLK_p;
break;
case Key_Q:
s = SDLK_q;
break;
case Key_R:
s = SDLK_r;
break;
case Key_S:
s = SDLK_s;
break;
case Key_T:
s = SDLK_t;
break;
case Key_U:
s = SDLK_u;
break;
case Key_V:
s = SDLK_v;
break;
case Key_W:
s = SDLK_w;
break;
case Key_X:
s = SDLK_x;
break;
case Key_Y:
s = SDLK_y;
break;
case Key_Z:
s = SDLK_z;
break;
case Key_BracketLeft:
s = SDLK_LEFTBRACKET;
break;
case Key_Backslash:
s = SDLK_BACKSLASH;
break;
case Key_BracketRight:
s = SDLK_RIGHTBRACKET;
break;
//case Key_AsciiCircum:
// s = SDLK_CARET;
//break;
case Key_Underscore:
s = SDLK_UNDERSCORE;
break;
case Key_QuoteLeft:
s = SDLK_BACKQUOTE;
break;
case Key_BraceLeft:
s = SDLK_LEFTBRACKET;
break;
case Key_Bar:
s = SDLK_BACKSLASH;
break;
case Key_BraceRight:
s = SDLK_RIGHTBRACKET;
break;
case Key_AsciiTilde:
s = SDLK_BACKQUOTE;
break;
//case Key_nobreakspace:
//case Key_exclamdown:
//case Key_cent:
//case Key_sterling:
//case Key_currency:
//case Key_yen:
//case Key_brokenbar:
//case Key_section:
//case Key_diaeresis:
//case Key_copyright:
//case Key_ordfeminine:
//case Key_guillemotleft:
//case Key_notsign:
//case Key_hyphen:
//case Key_registered:
//case Key_macron:
//case Key_degree:
//case Key_plusminus:
//case Key_twosuperior:
//case Key_threesuperior:
//case Key_acute:
//case Key_mu:
//case Key_paragraph:
//case Key_periodcentered:
//case Key_cedilla:
//case Key_onesuperior:
//case Key_masculine:
//case Key_guillemotright:
//case Key_onequarter:
//case Key_onehalf:
//case Key_threequarters:
//case Key_questiondown:
//case Key_Agrave:
//case Key_Aacute:
//case Key_Acircumflex:
//case Key_Atilde:
//case Key_Adiaeresis:
//case Key_Aring:
//case Key_AE:
//case Key_Ccedilla:
//case Key_Egrave:
//case Key_Eacute:
//case Key_Ecircumflex:
//case Key_Ediaeresis:
//case Key_Igrave:
//case Key_Iacute:
//case Key_Icircumflex:
//case Key_Idiaeresis:
//case Key_ETH:
//case Key_Ntilde:
//case Key_Ograve:
//case Key_Oacute:
//case Key_Ocircumflex:
//case Key_Otilde:
//case Key_Odiaeresis:
//case Key_multiply:
//case Key_Ooblique:
//case Key_Ugrave:
//case Key_Uacute:
//case Key_Ucircumflex:
//case Key_Udiaeresis:
//case Key_Yacute:
//case Key_THORN:
//case Key_ssharp:
//case Key_division:
//case Key_ydiaeresis:
// s = SDL_SCANCODE_UNKNOWN;
//break;
default:
s = SDLK_UNKNOWN;
break;
}
return s;
}
int pushKeyEvent( QKeyEvent *event, int pressDown )
{
SDL_Event sdlev;
if ( pressDown )
{
sdlev.type = SDL_KEYDOWN;
sdlev.key.state = SDL_PRESSED;
}
else
{
sdlev.type = SDL_KEYUP;
sdlev.key.state = SDL_RELEASED;
}
sdlev.key.keysym.sym = convQtKey2SDLKeyCode( (Qt::Key)event->key() );
sdlev.key.keysym.scancode = SDL_GetScancodeFromKey( sdlev.key.keysym.sym );
sdlev.key.keysym.mod = 0;
sdlev.key.repeat = 0;
if (sdlev.key.keysym.scancode != SDL_SCANCODE_UNKNOWN)
{
SDL_PushEvent (&sdlev);
}
return 0;
}

View File

@ -39,6 +39,16 @@
#define SDLK_APOSTROPHE SDLK_QUOTE
#define SDLK_BRACKET_LEFT SDLK_LEFTBRACKET
#define SDLK_BRACKET_RIGHT SDLK_RIGHTBRACKET
#define SDLK_SCROLLLOCK SDLK_SCROLLOCK /* I guess the SDL people don't like lots of Ls... */
//#define SDLK_SCROLLLOCK SDLK_SCROLLOCK /* I guess the SDL people don't like lots of Ls... */
#define SDLK_GRAVE SDLK_BACKQUOTE
#define MKK(k) SDLK_##k
#include <QtCore>
#include <QKeyEvent>
#include <SDL2/SDL.h>
SDL_Keycode convQtKey2SDLKeyCode( Qt::Key q );
SDL_Scancode convQtKey2SDLScanCode( Qt::Key q );
int pushKeyEvent( QKeyEvent *event, int pressDown );

View File

@ -1,307 +0,0 @@
######################################################################
# Automatically generated by qmake (3.1) Sat Jun 20 21:20:47 2020
######################################################################
TEMPLATE = app
TARGET = fceux
INCLUDEPATH += .
# The following define makes your compiler warn you if you use any
# feature of Qt which has been marked as deprecated (the exact warnings
# depend on your compiler). Please consult the documentation of the
# deprecated API in order to know how to port your code away from it.
DEFINES += QT_DEPRECATED_WARNINGS
# You can also make your code fail to compile if you use deprecated APIs.
# In order to do so, uncomment the following line.
# You can also select to disable deprecated APIs only up to a certain version of Qt.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
QT += widgets
CONFIG += object_parallel_to_source
unix {
QT_CONFIG -= no-pkg-config
CONFIG += link_pkgconfig
QMAKE_CXXFLAGS += -DPSS_STYLE=1 -DHAVE_ASPRINTF
packagesExist(minizip){
PKGCONFIG += minizip
QMAKE_CXXFLAGS += -D_SYSTEM_MINIZIP
}
packagesExist(zlib){
PKGCONFIG += zlib
}
PKGCONFIG += sdl2
packagesExist(lua-5.1){
PKGCONFIG += lua-5.1
QMAKE_CXXFLAGS += -D_S9XLUA_H
}
QMAKE_CXXFLAGS -= -O2
QMAKE_CXXFLAGS += -O0 -g3 -Wall -Wno-write-strings -Wno-sign-compare -Wno-parentheses -Wno-unused-local-typedefs
QMAKE_CXXFLAGS_RELEASE -= -O2
}
# Input
SOURCES += asm.cpp
SOURCES += cart.cpp
SOURCES += cheat.cpp
SOURCES += conddebug.cpp
SOURCES += config.cpp
SOURCES += debug.cpp
SOURCES += drawing.cpp
SOURCES += fceu.cpp
SOURCES += fds.cpp
SOURCES += file.cpp
SOURCES += emufile.cpp
SOURCES += filter.cpp
SOURCES += ines.cpp
SOURCES += input.cpp
SOURCES += movie.cpp
SOURCES += netplay.cpp
SOURCES += nsf.cpp
SOURCES += oldmovie.cpp
SOURCES += palette.cpp
SOURCES += ppu.cpp
SOURCES += sound.cpp
SOURCES += state.cpp
SOURCES += unif.cpp
SOURCES += video.cpp
SOURCES += vsuni.cpp
SOURCES += wave.cpp
SOURCES += x6502.cpp
unix {
packagesExist(lua-5.1){
SOURCES += lua-engine.cpp
}
}
SOURCES += boards/01-222.cpp
SOURCES += boards/09-034a.cpp
SOURCES += boards/103.cpp
SOURCES += boards/106.cpp
SOURCES += boards/108.cpp
SOURCES += boards/112.cpp
SOURCES += boards/116.cpp
SOURCES += boards/117.cpp
SOURCES += boards/120.cpp
SOURCES += boards/121.cpp
SOURCES += boards/12in1.cpp
SOURCES += boards/151.cpp
SOURCES += boards/156.cpp
SOURCES += boards/158B.cpp
SOURCES += boards/15.cpp
SOURCES += boards/164.cpp
SOURCES += boards/168.cpp
SOURCES += boards/170.cpp
SOURCES += boards/175.cpp
SOURCES += boards/176.cpp
SOURCES += boards/177.cpp
SOURCES += boards/178.cpp
SOURCES += boards/183.cpp
SOURCES += boards/185.cpp
SOURCES += boards/186.cpp
SOURCES += boards/187.cpp
SOURCES += boards/189.cpp
SOURCES += boards/18.cpp
SOURCES += boards/190.cpp
SOURCES += boards/193.cpp
SOURCES += boards/199.cpp
SOURCES += boards/206.cpp
SOURCES += boards/208.cpp
SOURCES += boards/222.cpp
SOURCES += boards/225.cpp
SOURCES += boards/228.cpp
SOURCES += boards/230.cpp
SOURCES += boards/232.cpp
SOURCES += boards/234.cpp
SOURCES += boards/235.cpp
SOURCES += boards/244.cpp
SOURCES += boards/246.cpp
SOURCES += boards/252.cpp
SOURCES += boards/253.cpp
SOURCES += boards/28.cpp
SOURCES += boards/32.cpp
SOURCES += boards/33.cpp
SOURCES += boards/34.cpp
SOURCES += boards/36.cpp
SOURCES += boards/3d-block.cpp
SOURCES += boards/40.cpp
SOURCES += boards/411120-c.cpp
SOURCES += boards/41.cpp
SOURCES += boards/42.cpp
SOURCES += boards/43.cpp
SOURCES += boards/46.cpp
SOURCES += boards/50.cpp
SOURCES += boards/51.cpp
SOURCES += boards/57.cpp
SOURCES += boards/603-5052.cpp
SOURCES += boards/62.cpp
SOURCES += boards/65.cpp
SOURCES += boards/67.cpp
SOURCES += boards/68.cpp
SOURCES += boards/69.cpp
SOURCES += boards/71.cpp
SOURCES += boards/72.cpp
SOURCES += boards/77.cpp
SOURCES += boards/79.cpp
SOURCES += boards/80013-B.cpp
SOURCES += boards/80.cpp
SOURCES += boards/8157.cpp
SOURCES += boards/8237.cpp
SOURCES += boards/82.cpp
SOURCES += boards/830118C.cpp
SOURCES += boards/88.cpp
SOURCES += boards/8in1.cpp
SOURCES += boards/90.cpp
SOURCES += boards/91.cpp
SOURCES += boards/96.cpp
SOURCES += boards/99.cpp
SOURCES += boards/a9746.cpp
SOURCES += boards/ac-08.cpp
SOURCES += boards/addrlatch.cpp
SOURCES += boards/ax5705.cpp
SOURCES += boards/bandai.cpp
SOURCES += boards/bb.cpp
SOURCES += boards/bmc13in1jy110.cpp
SOURCES += boards/bmc42in1r.cpp
SOURCES += boards/bmc64in1nr.cpp
SOURCES += boards/bmc70in1.cpp
SOURCES += boards/BMW8544.cpp
SOURCES += boards/bonza.cpp
SOURCES += boards/bs-5.cpp
SOURCES += boards/cheapocabra.cpp
SOURCES += boards/cityfighter.cpp
SOURCES += boards/coolboy.cpp
SOURCES += boards/dance2000.cpp
SOURCES += boards/datalatch.cpp
SOURCES += boards/dream.cpp
SOURCES += boards/__dummy_mapper.cpp
SOURCES += boards/edu2000.cpp
SOURCES += boards/eh8813a.cpp
SOURCES += boards/emu2413.c
SOURCES += boards/et-100.cpp
SOURCES += boards/et-4320.cpp
SOURCES += boards/F-15.cpp
SOURCES += boards/famicombox.cpp
SOURCES += boards/ffe.cpp
SOURCES += boards/fk23c.cpp
SOURCES += boards/fns.cpp
SOURCES += boards/ghostbusters63in1.cpp
SOURCES += boards/gs-2004.cpp
SOURCES += boards/gs-2013.cpp
SOURCES += boards/h2288.cpp
SOURCES += boards/hp10xx_hp20xx.cpp
SOURCES += boards/hp898f.cpp
SOURCES += boards/inlnsf.cpp
SOURCES += boards/karaoke.cpp
SOURCES += boards/kof97.cpp
SOURCES += boards/ks7010.cpp
SOURCES += boards/ks7012.cpp
SOURCES += boards/ks7013.cpp
SOURCES += boards/ks7016.cpp
SOURCES += boards/ks7017.cpp
SOURCES += boards/ks7030.cpp
SOURCES += boards/ks7031.cpp
SOURCES += boards/ks7032.cpp
SOURCES += boards/ks7037.cpp
SOURCES += boards/ks7057.cpp
SOURCES += boards/le05.cpp
SOURCES += boards/lh32.cpp
SOURCES += boards/lh53.cpp
SOURCES += boards/malee.cpp
SOURCES += boards/mihunche.cpp
SOURCES += boards/mmc1.cpp
SOURCES += boards/mmc2and4.cpp
SOURCES += boards/mmc3.cpp
SOURCES += boards/mmc5.cpp
SOURCES += boards/n106.cpp
SOURCES += boards/n625092.cpp
SOURCES += boards/novel.cpp
SOURCES += boards/onebus.cpp
SOURCES += boards/pec-586.cpp
SOURCES += boards/rt-01.cpp
SOURCES += boards/sa-9602b.cpp
SOURCES += boards/sachen.cpp
SOURCES += boards/sb-2000.cpp
SOURCES += boards/sc-127.cpp
SOURCES += boards/sheroes.cpp
SOURCES += boards/sl1632.cpp
SOURCES += boards/subor.cpp
SOURCES += boards/super24.cpp
SOURCES += boards/supervision.cpp
SOURCES += boards/t-227-1.cpp
SOURCES += boards/t-262.cpp
SOURCES += boards/tengen.cpp
SOURCES += boards/tf-1201.cpp
SOURCES += boards/transformer.cpp
SOURCES += boards/unrom512.cpp
SOURCES += boards/vrc1.cpp
SOURCES += boards/vrc2and4.cpp
SOURCES += boards/vrc3.cpp
SOURCES += boards/vrc5.cpp
SOURCES += boards/vrc6.cpp
SOURCES += boards/vrc7.cpp
SOURCES += boards/vrc7p.cpp
SOURCES += boards/yoko.cpp
SOURCES += input/arkanoid.cpp
SOURCES += input/bworld.cpp
SOURCES += input/cursor.cpp
SOURCES += input/fkb.cpp
SOURCES += input/fns.cpp
SOURCES += input/ftrainer.cpp
SOURCES += input/hypershot.cpp
SOURCES += input/mahjong.cpp
SOURCES += input/mouse.cpp
SOURCES += input/oekakids.cpp
SOURCES += input/pec586kb.cpp
SOURCES += input/powerpad.cpp
SOURCES += input/quiz.cpp
SOURCES += input/shadow.cpp
SOURCES += input/snesmouse.cpp
SOURCES += input/suborkb.cpp
SOURCES += input/toprider.cpp
SOURCES += input/virtualboy.cpp
SOURCES += input/zapper.cpp
SOURCES += utils/backward.cpp
SOURCES += utils/ConvertUTF.c
SOURCES += utils/xstring.cpp
SOURCES += utils/crc32.cpp
SOURCES += utils/endian.cpp
SOURCES += utils/general.cpp
SOURCES += utils/guid.cpp
SOURCES += utils/md5.cpp
SOURCES += utils/memory.cpp
SOURCES += drivers/common/args.cpp
SOURCES += drivers/common/cheat.cpp
SOURCES += drivers/common/config.cpp
SOURCES += drivers/common/configSys.cpp
SOURCES += drivers/common/hq2x.cpp
SOURCES += drivers/common/hq3x.cpp
SOURCES += drivers/common/scale2x.cpp
SOURCES += drivers/common/scale3x.cpp
SOURCES += drivers/common/scalebit.cpp
SOURCES += drivers/common/vidblit.cpp
SOURCES += drivers/common/nes_ntsc.c
HEADERS += drivers/Qt/GameApp.h
HEADERS += drivers/Qt/GameViewer.h
SOURCES += drivers/Qt/main.cpp
SOURCES += drivers/Qt/GameApp.cpp
SOURCES += drivers/Qt/GameViewer.cpp
SOURCES += drivers/Qt/fceuWrapper.cpp
SOURCES += drivers/Qt/config.cpp
SOURCES += drivers/Qt/input.cpp
SOURCES += drivers/Qt/gl_win.cpp
SOURCES += drivers/Qt/sdl-sound.cpp
SOURCES += drivers/Qt/sdl-video.cpp
SOURCES += drivers/Qt/sdl-joystick.cpp
SOURCES += drivers/Qt/sdl-throttle.cpp
SOURCES += drivers/Qt/unix-netplay.cpp