mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-04-24 22:34:54 +00:00
Port to *BSD. It runs but isn't terribly useful without Cg.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5934 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
cdce0ec322
commit
83883cee45
29 changed files with 5353 additions and 148 deletions
13
Externals/SDL/SConscript
vendored
13
Externals/SDL/SConscript
vendored
|
@ -10,7 +10,14 @@ files = [
|
|||
'src/joystick/SDL_joystick.c',
|
||||
]
|
||||
|
||||
if sys.platform == 'darwin':
|
||||
if sys.platform.count('bsd'):
|
||||
env['LIBS'] += ['usbhid']
|
||||
files += [
|
||||
'src/joystick/bsd/SDL_sysjoystick.c',
|
||||
'src/stdlib/SDL_malloc.c',
|
||||
'src/stdlib/SDL_string.c',
|
||||
]
|
||||
elif sys.platform == 'darwin':
|
||||
files += [
|
||||
'src/joystick/darwin/SDL_sysjoystick.c',
|
||||
]
|
||||
|
@ -19,6 +26,10 @@ elif sys.platform == 'linux2':
|
|||
'src/joystick/linux/SDL_sysjoystick.c',
|
||||
'src/stdlib/SDL_string.c',
|
||||
]
|
||||
elif sys.platform == 'win32':
|
||||
files += [
|
||||
'src/joystick/win32/SDL_mmjoystick.c',
|
||||
]
|
||||
else:
|
||||
files += [
|
||||
'src/joystick/dummy/SDL_sysjoystick.c',
|
||||
|
|
67
Externals/SDL/SDL/SDL_config_bsd.h
vendored
Normal file
67
Externals/SDL/SDL/SDL_config_bsd.h
vendored
Normal file
|
@ -0,0 +1,67 @@
|
|||
#ifndef _SDL_config_h
|
||||
#define _SDL_config_h
|
||||
|
||||
#include <sys/ioctl.h> /* XXX */
|
||||
|
||||
#define SDL_JOYSTICK_USBHID 1
|
||||
|
||||
#ifdef __FreeBSD__
|
||||
#define HAVE_USBHID_H
|
||||
#endif
|
||||
#define USBHID_NEW
|
||||
#define USBHID_UCR_DATA
|
||||
|
||||
#define HAVE_ABS 1
|
||||
#define HAVE_ALLOCA 1
|
||||
#define HAVE_ATOF 1
|
||||
#define HAVE_ATOI 1
|
||||
#define HAVE_BCOPY 1
|
||||
#define HAVE_CALLOC 1
|
||||
#define HAVE_CTYPE_H 1
|
||||
#define HAVE_FREE 1
|
||||
#define HAVE_GETENV 1
|
||||
#define HAVE_INTTYPES_H 1
|
||||
#define HAVE_MALLOC 1
|
||||
#define HAVE_MATH_H 1
|
||||
#define HAVE_MEMCMP 1
|
||||
#define HAVE_MEMCPY 1
|
||||
#define HAVE_MEMMOVE 1
|
||||
#define HAVE_MEMORY_H 1
|
||||
#define HAVE_MEMSET 1
|
||||
#define HAVE_MPROTECT 1
|
||||
#define HAVE_NANOSLEEP 1
|
||||
#define HAVE_PUTENV 1
|
||||
#define HAVE_QSORT 1
|
||||
#define HAVE_REALLOC 1
|
||||
#define HAVE_SETJMP 1
|
||||
#define HAVE_SIGACTION 1
|
||||
#define HAVE_SIGNAL_H 1
|
||||
#define HAVE_SNPRINTF 1
|
||||
#define HAVE_SSCANF 1
|
||||
#define HAVE_STDARG_H 1
|
||||
#define HAVE_STDINT_H 1
|
||||
#define HAVE_STDIO_H 1
|
||||
#define HAVE_STDLIB_H 1
|
||||
#define HAVE_STRCASECMP 1
|
||||
#define HAVE_STRCHR 1
|
||||
#define HAVE_STRCMP 1
|
||||
#define HAVE_STRDUP 1
|
||||
#define HAVE_STRINGS_H 1
|
||||
#define HAVE_STRING_H 1
|
||||
#define HAVE_STRLCAT 1
|
||||
#define HAVE_STRLCPY 1
|
||||
#define HAVE_STRLEN 1
|
||||
#define HAVE_STRNCASECMP 1
|
||||
#define HAVE_STRNCMP 1
|
||||
#define HAVE_STRRCHR 1
|
||||
#define HAVE_STRSTR 1
|
||||
#define HAVE_STRTOD 1
|
||||
#define HAVE_STRTOL 1
|
||||
#define HAVE_STRTOLL 1
|
||||
#define HAVE_STRTOUL 1
|
||||
#define HAVE_STRTOULL 1
|
||||
#define HAVE_SYS_TYPES_H
|
||||
#define HAVE_UNSETENV 1
|
||||
#define HAVE_VSNPRINTF 1
|
||||
|
||||
#endif
|
4
Externals/SDL/SDL_config.h
vendored
4
Externals/SDL/SDL_config.h
vendored
|
@ -1,5 +1,9 @@
|
|||
#include <sys/param.h>
|
||||
|
||||
#if defined __APPLE__
|
||||
#include "include/SDL_config_macosx.h"
|
||||
#elif defined BSD4_4
|
||||
#include "SDL/SDL_config_bsd.h"
|
||||
#elif defined __linux__
|
||||
#include "SDL/SDL_config_linux.h"
|
||||
#endif
|
||||
|
|
|
@ -197,12 +197,12 @@ SDL_SYS_JoystickInit(void)
|
|||
}
|
||||
|
||||
const char *
|
||||
SDL_SYS_JoystickName(int index)
|
||||
SDL_SYS_JoystickName(int jindex)
|
||||
{
|
||||
if (joydevnames[index] != NULL) {
|
||||
return (joydevnames[index]);
|
||||
if (joydevnames[jindex] != NULL) {
|
||||
return (joydevnames[jindex]);
|
||||
}
|
||||
return (joynames[index]);
|
||||
return (joynames[jindex]);
|
||||
}
|
||||
|
||||
static int
|
||||
|
|
5111
Externals/SDL/src/stdlib/SDL_malloc.c
vendored
Normal file
5111
Externals/SDL/src/stdlib/SDL_malloc.c
vendored
Normal file
File diff suppressed because it is too large
Load diff
13
SConstruct
13
SConstruct
|
@ -35,7 +35,6 @@ cppDefines = [
|
|||
]
|
||||
|
||||
include_paths = [
|
||||
'#',
|
||||
'#Source/Core/Common/Src',
|
||||
'#Source/Core/DiscIO/Src',
|
||||
'#Source/PluginSpecs',
|
||||
|
@ -68,7 +67,6 @@ dirs = [
|
|||
'Source/Core/DSPCore/Src',
|
||||
'Source/DSPTool/Src',
|
||||
'Source/Core/InputUICommon/Src',
|
||||
'Source/Plugins/Plugin_VideoOGL/Src',
|
||||
'Source/Plugins/Plugin_VideoSoftware/Src',
|
||||
'Source/Plugins/Plugin_DSP_HLE/Src',
|
||||
'Source/Plugins/Plugin_DSP_LLE/Src',
|
||||
|
@ -79,6 +77,9 @@ dirs = [
|
|||
'Source/UnitTests',
|
||||
]
|
||||
|
||||
if sys.platform == 'darwin' or sys.platform == 'linux2':
|
||||
dirs += ['Source/Plugins/Plugin_VideoOGL/Src']
|
||||
|
||||
builders = {}
|
||||
if sys.platform == 'darwin':
|
||||
from plistlib import writePlist
|
||||
|
@ -288,13 +289,13 @@ elif sys.platform == 'win32':
|
|||
env['tools'] = ['mingw']
|
||||
|
||||
else:
|
||||
env['CPPPATH'].insert(0, '#')
|
||||
env['LINKFLAGS'] += ['-pthread']
|
||||
conf = env.Configure(custom_tests = tests, config_h="#config.h")
|
||||
|
||||
if not conf.CheckPKGConfig('0.15.0'):
|
||||
print "Can't find pkg-config, some tests will fail"
|
||||
|
||||
env['LINKFLAGS'] += ['-pthread']
|
||||
|
||||
if env['shared_glew']:
|
||||
shared['glew'] = conf.CheckPKG('GLEW')
|
||||
if env['shared_sdl']:
|
||||
|
@ -324,6 +325,8 @@ else:
|
|||
print "WX libraries not found - see config.log"
|
||||
Exit(1)
|
||||
|
||||
conf.CheckPKG('usbhid')
|
||||
|
||||
env['HAVE_BLUEZ'] = conf.CheckPKG('bluez')
|
||||
conf.Define('HAVE_BLUEZ', env['HAVE_BLUEZ'])
|
||||
|
||||
|
@ -359,6 +362,8 @@ else:
|
|||
if not conf.CheckPKG('GLU'):
|
||||
print "Must have GLU to build"
|
||||
Exit(1)
|
||||
|
||||
if sys.platform == 'linux2':
|
||||
if not conf.CheckPKG('Cg'):
|
||||
print "Must have Cg toolkit from NVidia to build"
|
||||
Exit(1)
|
||||
|
|
|
@ -26,12 +26,14 @@ void AudioCommonConfig::Load(IniFile &file) {
|
|||
file.Get("Config", "Volume", &m_Volume, 75);
|
||||
#ifdef _WIN32
|
||||
file.Get("Config", "Backend", &sBackend, BACKEND_DIRECTSOUND);
|
||||
#elif defined(__APPLE__)
|
||||
#elif defined __APPLE__
|
||||
std::string temp;
|
||||
file.Get("Config", "Backend", &temp, BACKEND_COREAUDIO);
|
||||
strncpy(sBackend, temp.c_str(), 128);
|
||||
#else // linux
|
||||
#elif defined __linux__
|
||||
file.Get("Config", "Backend", &sBackend, BACKEND_ALSA);
|
||||
#else
|
||||
file.Get("Config", "Backend", &sBackend, BACKEND_OPENAL);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
#ifdef _WIN32
|
||||
#include "../../../../Externals/OpenAL/include/al.h"
|
||||
#include "../../../../Externals/OpenAL/include/alc.h"
|
||||
#elif defined __linux__
|
||||
#else
|
||||
#include <AL/al.h>
|
||||
#include <AL/alc.h>
|
||||
#endif
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
#ifdef _WIN32
|
||||
#include "../../../../Externals/OpenAL/include/al.h"
|
||||
#include "../../../../Externals/OpenAL/include/alc.h"
|
||||
#else // linux
|
||||
#else
|
||||
#include <AL/al.h>
|
||||
#include <AL/alc.h>
|
||||
#endif
|
||||
|
|
|
@ -7,24 +7,26 @@
|
|||
#include <windows.h>
|
||||
#elif __APPLE__
|
||||
#include <CoreFoundation/CoreFoundation.h>
|
||||
#include <IOKit/IOBSD.h>
|
||||
#include <IOKit/IOKitLib.h>
|
||||
#include <IOKit/storage/IOCDMedia.h>
|
||||
#include <IOKit/storage/IOMedia.h>
|
||||
#include <IOKit/IOBSD.h>
|
||||
#include <paths.h>
|
||||
#elif __linux__
|
||||
#else
|
||||
#include <fcntl.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <linux/cdrom.h>
|
||||
#endif // WIN32
|
||||
|
||||
#ifdef __linux__
|
||||
#include <linux/cdrom.h>
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
// Returns a string that can be used in a CreateFile call if
|
||||
// c_drive letter is a character. If not NULL is returned.
|
||||
const char *is_cdrom(const char c_drive_letter)
|
||||
{
|
||||
|
||||
UINT uDriveType;
|
||||
char sz_win32_drive[4];
|
||||
|
||||
|
@ -44,10 +46,12 @@ const char *is_cdrom(const char c_drive_letter)
|
|||
return __strdup(&sz_win32_drive_full[4]);
|
||||
}
|
||||
default:
|
||||
{
|
||||
//cdio_debug("Drive %c is not a CD-ROM", c_drive_letter);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Returns a pointer to an array of strings with the device names
|
||||
std::vector<std::string> cdio_get_devices() {
|
||||
|
@ -83,12 +87,11 @@ std::vector<std::string> cdio_get_devices()
|
|||
if( classes_to_match == NULL )
|
||||
return( drives );
|
||||
|
||||
CFDictionarySetValue( classes_to_match, CFSTR(kIOMediaEjectableKey),
|
||||
kCFBooleanTrue );
|
||||
CFDictionarySetValue( classes_to_match,
|
||||
CFSTR(kIOMediaEjectableKey), kCFBooleanTrue );
|
||||
|
||||
kern_result = IOServiceGetMatchingServices( master_port,
|
||||
classes_to_match,
|
||||
&media_iterator );
|
||||
classes_to_match, &media_iterator );
|
||||
if( kern_result != KERN_SUCCESS)
|
||||
return( drives );
|
||||
|
||||
|
@ -103,8 +106,7 @@ std::vector<std::string> cdio_get_devices()
|
|||
{
|
||||
str_bsd_path =
|
||||
IORegistryEntryCreateCFProperty( next_media,
|
||||
CFSTR( kIOBSDNameKey ),
|
||||
kCFAllocatorDefault,
|
||||
CFSTR( kIOBSDNameKey ), kCFAllocatorDefault,
|
||||
0 );
|
||||
if( str_bsd_path == NULL )
|
||||
{
|
||||
|
@ -137,7 +139,7 @@ std::vector<std::string> cdio_get_devices()
|
|||
IOObjectRelease( media_iterator );
|
||||
return drives;
|
||||
}
|
||||
#elif defined __linux__
|
||||
#else
|
||||
// checklist: /dev/cdrom, /dev/dvd /dev/hd?, /dev/scd? /dev/sr?
|
||||
static struct
|
||||
{
|
||||
|
@ -146,11 +148,16 @@ static struct
|
|||
unsigned int num_max;
|
||||
} checklist[] =
|
||||
{
|
||||
#ifdef __linux__
|
||||
{ "/dev/cdrom", 0, 0},
|
||||
{ "/dev/dvd", 0, 0},
|
||||
{ "/dev/hd%c", 'a', 'z' },
|
||||
{ "/dev/scd%d", 0, 27 },
|
||||
{ "/dev/sr%d", 0, 27 },
|
||||
#else
|
||||
{ "/dev/acd%d", 0, 27 },
|
||||
{ "/dev/cd%d", 0, 27 },
|
||||
#endif
|
||||
{ NULL }
|
||||
};
|
||||
|
||||
|
@ -161,7 +168,8 @@ bool is_device(const char *source_name)
|
|||
if (0 != lstat(source_name, &buf))
|
||||
return false;
|
||||
|
||||
return ((S_ISBLK(buf.st_mode) || S_ISCHR(buf.st_mode)) && !S_ISLNK(buf.st_mode));
|
||||
return ((S_ISBLK(buf.st_mode) || S_ISCHR(buf.st_mode)) &&
|
||||
!S_ISLNK(buf.st_mode));
|
||||
}
|
||||
|
||||
// Check a device to see if it is a DVD/CD-ROM drive
|
||||
|
@ -178,7 +186,9 @@ static bool is_cdrom(const char *drive, char *mnttype)
|
|||
cdfd = open(drive, (O_RDONLY|O_NONBLOCK), 0);
|
||||
if ( cdfd >= 0 )
|
||||
{
|
||||
#ifdef __linux__
|
||||
if (ioctl(cdfd, CDROM_GET_CAPABILITY, 0) != -1)
|
||||
#endif
|
||||
is_cd = true;
|
||||
close(cdfd);
|
||||
}
|
||||
|
@ -188,7 +198,6 @@ static bool is_cdrom(const char *drive, char *mnttype)
|
|||
// Returns a pointer to an array of strings with the device names
|
||||
std::vector<std::string> cdio_get_devices ()
|
||||
{
|
||||
|
||||
unsigned int i;
|
||||
char drive[40];
|
||||
std::vector<std::string> drives;
|
||||
|
@ -215,8 +224,8 @@ std::vector<std::string> cdio_get_devices ()
|
|||
bool cdio_is_cdrom(std::string device)
|
||||
{
|
||||
#ifdef __linux__
|
||||
// Resolve symbolic links. This allows symbolic links to valid cdrom/dvd drives to
|
||||
// be passed from the command line with the -e flag.
|
||||
// Resolve symbolic links. This allows symbolic links to valid
|
||||
// drives to be passed from the command line with the -e flag.
|
||||
char *devname = realpath(device.c_str(), NULL);
|
||||
if (!devname)
|
||||
return false;
|
||||
|
|
|
@ -29,15 +29,14 @@ template<> struct CompileTimeAssert<true> {};
|
|||
|
||||
#ifndef _WIN32
|
||||
|
||||
#if defined __APPLE__
|
||||
char* strndup (char const *s, size_t n);
|
||||
size_t strnlen(const char *s, size_t n);
|
||||
#else
|
||||
#include <errno.h>
|
||||
#ifdef __linux__
|
||||
#include <byteswap.h>
|
||||
#else
|
||||
char * strndup(char const *s, size_t n);
|
||||
size_t strnlen(const char *s, size_t n);
|
||||
#endif
|
||||
#endif // APPLE
|
||||
#include <errno.h>
|
||||
|
||||
// go to debugger mode
|
||||
#ifdef GEKKO
|
||||
#define Crash()
|
||||
|
|
|
@ -48,6 +48,10 @@
|
|||
#define S_ISDIR(m) (((m)&S_IFMT) == S_IFDIR)
|
||||
#endif
|
||||
|
||||
#if defined __NetBSD__ || defined __FreeBSD__ || defined __OpenBSD__
|
||||
#define stat64 stat // XXX
|
||||
#endif
|
||||
|
||||
// This namespace has various generic functions related to files and paths.
|
||||
// The code still needs a ton of cleanup.
|
||||
// REMEMBER: strdup considered harmful!
|
||||
|
|
|
@ -120,7 +120,7 @@ u8* MemArena::Find4GBBase()
|
|||
return base;
|
||||
#else
|
||||
void* base = mmap(0, 0x31000000, PROT_READ | PROT_WRITE,
|
||||
MAP_ANON | MAP_SHARED, 0, 0);
|
||||
MAP_ANON | MAP_SHARED, -1, 0);
|
||||
if (base == MAP_FAILED) {
|
||||
PanicAlert("Failed to map 1 GB of memory space: %s", strerror(errno));
|
||||
return 0;
|
||||
|
|
|
@ -37,7 +37,7 @@ const char *GetLastErrorMsg()
|
|||
return errStr;
|
||||
}
|
||||
|
||||
#ifdef __APPLE__
|
||||
#if !defined(__linux__) && !defined(_WIN32)
|
||||
// strlen with cropping after size n
|
||||
size_t strnlen(const char *s, size_t n)
|
||||
{
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
// http://code.google.com/p/dolphin-emu/
|
||||
|
||||
#include <time.h>
|
||||
#include <sys/timeb.h>
|
||||
#include <sys/time.h>
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <Windows.h>
|
||||
|
@ -37,9 +37,9 @@ u32 Timer::GetTimeMs() {
|
|||
#else
|
||||
u32 Timer::GetTimeMs()
|
||||
{
|
||||
struct timeb t;
|
||||
ftime(&t);
|
||||
return ((u32)(t.time * 1000 + t.millitm));
|
||||
struct timeval t;
|
||||
(void)gettimeofday(&t, NULL);
|
||||
return((u32)(t.tv_sec * 1000 + t.tv_usec / 1000));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -202,9 +202,9 @@ std::string Timer::GetTimeFormatted()
|
|||
strftime(tmp, 6, "%M:%S", gmTime);
|
||||
|
||||
// Now tack on the milliseconds
|
||||
struct timeb tp;
|
||||
(void)::ftime(&tp);
|
||||
sprintf(formattedTime, "%s:%03i", tmp, tp.millitm);
|
||||
struct timeval t;
|
||||
(void)gettimeofday(&t, NULL);
|
||||
sprintf(formattedTime, "%s:%03ld", tmp, t.tv_usec / 1000);
|
||||
|
||||
return std::string(formattedTime);
|
||||
}
|
||||
|
@ -214,8 +214,8 @@ std::string Timer::GetTimeFormatted()
|
|||
// ----------------
|
||||
double Timer::GetDoubleTime()
|
||||
{
|
||||
struct timeb tp;
|
||||
(void)::ftime(&tp);
|
||||
struct timeval t;
|
||||
(void)gettimeofday(&t, NULL);
|
||||
u64 TmpSeconds = Common::Timer::GetTimeSinceJan1970(); // Get continous timestamp
|
||||
|
||||
/* Remove a few years. We only really want enough seconds to make sure that we are
|
||||
|
@ -226,7 +226,7 @@ double Timer::GetDoubleTime()
|
|||
//if (TmpSeconds < 0) return 0; // Check the the user's clock is working somewhat
|
||||
|
||||
u32 Seconds = (u32)TmpSeconds; // Make a smaller integer that fits in the double
|
||||
double ms = tp.millitm / 1000.0;
|
||||
double ms = t.tv_usec / 1000.0 / 1000.0;
|
||||
double TmpTime = Seconds + ms;
|
||||
return TmpTime;
|
||||
}
|
||||
|
|
|
@ -211,8 +211,7 @@ bool RamWriteAndFill()
|
|||
case 0x4 :
|
||||
{
|
||||
// TODO: complete
|
||||
u32 new_data = data;
|
||||
|
||||
// u32 new_data = data;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
@ -372,7 +371,6 @@ bool FlowControl()
|
|||
|
||||
// not all of these are used in all subtypes
|
||||
const u8 block_num = (u8)(code.data & 0xF);
|
||||
const s16 code_offset = (s16)code.address;
|
||||
|
||||
switch (code.subtype)
|
||||
{
|
||||
|
@ -680,8 +678,6 @@ bool SpecialIf()
|
|||
// CT5 Part2 : 16bits Counter check
|
||||
// TODO:
|
||||
|
||||
const u16 z = (u16)(data >> 16);
|
||||
|
||||
switch (code.subtype)
|
||||
{
|
||||
// CST4 : 16bits (endif, then) If counter value equal
|
||||
|
|
|
@ -136,6 +136,4 @@ void SaveCodes(IniFile& inifile, const std::vector<GeckoCode>& gcodes)
|
|||
inifile.SetLines(GECKO_CODE_INI_SECTION, lines);
|
||||
}
|
||||
|
||||
|
||||
|
||||
};
|
|
@ -12,9 +12,6 @@ namespace Gecko
|
|||
void LoadCodes(const IniFile& inifile, std::vector<GeckoCode>& gcodes);
|
||||
void SaveCodes(IniFile& inifile, const std::vector<GeckoCode>& gcodes);
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
#endif
|
|
@ -24,7 +24,11 @@
|
|||
#include <fcntl.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <net/if.h>
|
||||
#ifdef __linux__
|
||||
#include <linux/if_tun.h>
|
||||
#else
|
||||
#include <net/if_tun.h>
|
||||
#endif
|
||||
#include <assert.h>
|
||||
int fd = -1;
|
||||
bool CEXIETHERNET::deactivate()
|
||||
|
@ -39,6 +43,7 @@ bool CEXIETHERNET::isActivated()
|
|||
}
|
||||
|
||||
bool CEXIETHERNET::activate() {
|
||||
#ifdef __linux__
|
||||
if(isActivated())
|
||||
return true;
|
||||
if( (fd = open("/dev/net/tun", O_RDWR)) < 0)
|
||||
|
@ -77,8 +82,8 @@ bool CEXIETHERNET::activate() {
|
|||
system("brctl addif pan0 Dolphin");
|
||||
system("ifconfig Dolphin 0.0.0.0 promisc up");
|
||||
resume();
|
||||
#endif
|
||||
return true;
|
||||
|
||||
}
|
||||
bool CEXIETHERNET::CheckRecieved()
|
||||
{
|
||||
|
|
|
@ -353,17 +353,7 @@ u8 CWII_IPC_HLE_Device_usb_kbd::m_KeyCodesAZERTY[256] = {
|
|||
0x00, // Nothing interesting past this point.
|
||||
|
||||
};
|
||||
#elif defined __linux__
|
||||
// TODO Add support for Linux keycodes
|
||||
u8 CWII_IPC_HLE_Device_usb_kbd::m_KeyCodesQWERTY[256] = {
|
||||
0
|
||||
};
|
||||
|
||||
u8 CWII_IPC_HLE_Device_usb_kbd::m_KeyCodesAZERTY[256] = {
|
||||
0
|
||||
};
|
||||
#elif defined __APPLE__
|
||||
// TODO Add support for Apple keycodes
|
||||
#else
|
||||
u8 CWII_IPC_HLE_Device_usb_kbd::m_KeyCodesQWERTY[256] = {
|
||||
0
|
||||
};
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
|
||||
|
||||
#ifndef _WIN32
|
||||
#include <execinfo.h>
|
||||
#include <stdio.h>
|
||||
#include <signal.h>
|
||||
#include <sys/ucontext.h> // Look in here for the context definition.
|
||||
|
@ -26,11 +25,16 @@
|
|||
#define CREG_RIP(ctx) (ctx)->gregs[REG_RIP]
|
||||
#define CREG_EAX(ctx) (ctx)->gregs[REG_EAX]
|
||||
#define CREG_EIP(ctx) (ctx)->gregs[REG_EIP]
|
||||
#elif defined(__APPLE__)
|
||||
#elif defined __APPLE__
|
||||
#define CREG_RAX(ctx) (*(ctx))->__ss.__rax
|
||||
#define CREG_RIP(ctx) (*(ctx))->__ss.__rip
|
||||
#define CREG_EAX(ctx) (*(ctx))->__ss.__eax
|
||||
#define CREG_EIP(ctx) (*(ctx))->__ss.__eip
|
||||
#else
|
||||
#define CREG_RAX(ctx) (ctx)->mc_rax
|
||||
#define CREG_RIP(ctx) (ctx)->mc_rip
|
||||
#define CREG_EAX(ctx) (ctx)->mc_eax
|
||||
#define CREG_EIP(ctx) (ctx)->mc_eip
|
||||
#endif
|
||||
|
||||
#else
|
||||
|
@ -152,10 +156,10 @@ void InstallExceptionHandler()
|
|||
|
||||
#else // _WIN32
|
||||
|
||||
//
|
||||
// backtrace useful function
|
||||
//
|
||||
|
||||
#if defined __APPLE__ || defined __linux__ || defined _WIN32
|
||||
#ifndef _WIN32
|
||||
#include <execinfo.h>
|
||||
#endif
|
||||
void print_trace(const char * msg)
|
||||
{
|
||||
void *array[100];
|
||||
|
@ -170,6 +174,7 @@ void print_trace(const char * msg)
|
|||
printf("--> %s\n", strings[i]);
|
||||
free(strings);
|
||||
}
|
||||
#endif
|
||||
|
||||
void sigsegv_handler(int signal, siginfo_t *info, void *raw_context)
|
||||
{
|
||||
|
|
|
@ -256,6 +256,8 @@ int DSPCore_RunCycles(int cycles)
|
|||
|
||||
DSPHost_UpdateDebugger();
|
||||
break;
|
||||
case DSPCORE_STOP:
|
||||
break;
|
||||
}
|
||||
}
|
||||
return cycles;
|
||||
|
|
|
@ -82,6 +82,7 @@ elif sys.platform == 'darwin' and env['HAVE_WX']:
|
|||
)
|
||||
else:
|
||||
files += [ 'X11Utils.cpp' ]
|
||||
libs += [ 'SDL' ]
|
||||
exeGUI = env['binary_dir'] + 'dolphin-emu'
|
||||
exeNoGUI = env['binary_dir'] + 'dolphin-emu-nogui'
|
||||
|
||||
|
|
|
@ -8,7 +8,8 @@ files = [
|
|||
'InputConfig.cpp',
|
||||
'ControllerInterface/ControllerInterface.cpp',
|
||||
'UDPWiimote.cpp',
|
||||
'UDPWrapper.cpp'
|
||||
'UDPWrapper.cpp',
|
||||
'SDL_Util.cpp', # XXX needed by old Wiimote plugin
|
||||
]
|
||||
|
||||
if sys.platform == 'win32':
|
||||
|
@ -16,6 +17,7 @@ if sys.platform == 'win32':
|
|||
'ControllerInterface/DInput/DInput.cpp',
|
||||
'ControllerInterface/DInput/DInputJoystick.cpp',
|
||||
'ControllerInterface/DInput/DInputKeyboardMouse.cpp'
|
||||
'ControllerInterface/SDL/SDL.cpp',
|
||||
'ControllerInterface/XInput/XInput.cpp',
|
||||
]
|
||||
elif sys.platform == 'darwin':
|
||||
|
@ -23,18 +25,12 @@ elif sys.platform == 'darwin':
|
|||
'ControllerInterface/OSX/OSX.mm',
|
||||
'ControllerInterface/OSX/OSXKeyboard.mm',
|
||||
'ControllerInterface/OSX/OSXMouse.mm',
|
||||
'SDL_Util.cpp', # XXX needed by old Wiimote plugin
|
||||
]
|
||||
else:
|
||||
elif env['HAVE_X11']:
|
||||
files += [
|
||||
'ControllerInterface/SDL/SDL.cpp',
|
||||
'ControllerInterface/Xlib/Xlib.cpp',
|
||||
'X11InputBase.cpp'
|
||||
]
|
||||
|
||||
if sys.platform == 'win32' or sys.platform == 'linux2':
|
||||
files += [
|
||||
'ControllerInterface/SDL/SDL.cpp',
|
||||
'SDL_Util.cpp',
|
||||
]
|
||||
|
||||
env.StaticLibrary(env['local_libs'] + "inputcommon", files)
|
||||
|
|
|
@ -76,8 +76,10 @@ WiimoteBasicConfigDialog::WiimoteBasicConfigDialog(wxWindow *parent, wxWindowID
|
|||
ControlsCreated = false;
|
||||
m_Page = 0;
|
||||
|
||||
#if defined HAVE_WIIUSE && HAVE_WIIUSE
|
||||
// Initialize the Real WiiMotes here, so we get a count of how many were found and set everything properly
|
||||
WiiMoteReal::Initialize();
|
||||
#endif
|
||||
|
||||
CreateGUIControls();
|
||||
UpdateGUI();
|
||||
|
@ -93,7 +95,9 @@ void WiimoteBasicConfigDialog::ButtonClick(wxCommandEvent& event)
|
|||
switch(event.GetId())
|
||||
{
|
||||
case wxID_OK:
|
||||
#if defined HAVE_WIIUSE && HAVE_WIIUSE
|
||||
WiiMoteReal::Allocate();
|
||||
#endif
|
||||
g_Config.Save();
|
||||
Close();
|
||||
break;
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
#include "WiimoteEmu.h"
|
||||
|
||||
#ifdef USE_WIIMOTE_EMU_SPEAKER
|
||||
|
|
Loading…
Add table
Reference in a new issue