mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 14:19:46 -06:00
Simplify the SCons build:
On OS X, build all code as Objective-C(++). Centralize framework handling. Cleanup. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5645 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -102,11 +102,11 @@ bool EventHandler::TestEvent (Keys k, sf::Event e)
|
||||
|
||||
#if defined HAVE_WX && HAVE_WX
|
||||
// Taken from wxw source code
|
||||
sf::Key::Code EventHandler::wxCharCodeToSF(int id)
|
||||
sf::Key::Code EventHandler::wxCharCodeToSF(int charcode)
|
||||
{
|
||||
sf::Key::Code sfKey;
|
||||
|
||||
switch (id) {
|
||||
switch (charcode) {
|
||||
// case WXK_CANCEL: sfKey = sf::Key::Cancel; break;
|
||||
// case WXK_BACK: sfKey = sf::Key::BackSpace; break;
|
||||
case WXK_TAB: sfKey = sf::Key::Tab; break;
|
||||
@ -181,12 +181,12 @@ sf::Key::Code EventHandler::wxCharCodeToSF(int id)
|
||||
default:
|
||||
|
||||
// To lower (will tolower work on windows?)
|
||||
if (id >= 'A' && id <= 'Z')
|
||||
id = id - 'A' + 'a';
|
||||
if (charcode >= 'A' && charcode <= 'Z')
|
||||
charcode = charcode - 'A' + 'a';
|
||||
|
||||
if ((id >= 'a' && id <= 'z') ||
|
||||
(id >= '0' && id <= '9'))
|
||||
sfKey = (sf::Key::Code)id;
|
||||
if ((charcode >= 'a' && charcode <= 'z') ||
|
||||
(charcode >= '0' && charcode <= '9'))
|
||||
sfKey = (sf::Key::Code)charcode;
|
||||
else
|
||||
sfKey = sf::Key::Count; // Invalid key
|
||||
|
||||
|
@ -1,7 +1,6 @@
|
||||
# -*- python -*-
|
||||
import sys
|
||||
Import('env')
|
||||
icenv = env.Clone()
|
||||
|
||||
files = [
|
||||
'Configuration.cpp',
|
||||
@ -21,7 +20,7 @@ if env['HAVE_WX']:
|
||||
"WXInputBase.cpp",
|
||||
]
|
||||
|
||||
if icenv['HAVE_SDL']:
|
||||
if env['HAVE_SDL']:
|
||||
files += [
|
||||
'ControllerInterface/SDL/SDL.cpp'
|
||||
]
|
||||
@ -32,11 +31,10 @@ if sys.platform == 'darwin':
|
||||
'ControllerInterface/OSX/OSXKeyboard.mm',
|
||||
'ControllerInterface/OSX/OSXMouse.mm'
|
||||
]
|
||||
icenv['FRAMEWORKS'] = ['IOKit']
|
||||
|
||||
if sys.platform == 'linux2':
|
||||
files += [
|
||||
'ControllerInterface/Xlib/Xlib.cpp'
|
||||
]
|
||||
|
||||
icenv.StaticLibrary(env['local_libs'] + "inputcommon", files)
|
||||
env.StaticLibrary(env['local_libs'] + "inputcommon", files)
|
||||
|
Reference in New Issue
Block a user