mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-24 16:39:43 +00:00
(Xbox 1) benchmark.c - add Xbox 1 support
This commit is contained in:
parent
939749604f
commit
8ffd954122
17
benchmark.c
17
benchmark.c
@ -26,8 +26,21 @@
|
||||
|
||||
unsigned long long rarch_get_performance_counter(void)
|
||||
{
|
||||
#if defined(__CELLOS_LV2__) || defined(GEKKO) || defined(_XBOX360)
|
||||
unsigned long long time = __mftb();
|
||||
unsigned long long time = 0;
|
||||
#ifdef _XBOX1
|
||||
#define rdtsc __asm __emit 0fh __asm __emit 031h
|
||||
LARGE_INTEGER time_tmp;
|
||||
rdtsc;
|
||||
__asm mov time_tmp.LowPart, eax;
|
||||
__asm mov time_tmp.HighPart, edx;
|
||||
time = time_tmp.QuadPart;
|
||||
#elif defined(__i386__) || defined(__i486__) || defined(__x86_64__)
|
||||
uint64_t lo, hi;
|
||||
__asm__ __volatile__("rdtsc" : "=a" (lo), "=d" (hi));
|
||||
time = ((((uint64 t)hi) << 32) | ((uint64 t)lo) );
|
||||
#elif defined(__CELLOS_LV2__) || defined(GEKKO) || defined(_XBOX360)
|
||||
time = __mftb();
|
||||
#endif
|
||||
(void)time;
|
||||
return time;
|
||||
}
|
||||
|
@ -42,7 +42,7 @@ CONSOLE EXTENSIONS
|
||||
#include "../rarch_console_exec.c"
|
||||
#endif
|
||||
|
||||
#if defined(__CELLOS_LV2__) || defined(GEKKO) || defined(_XBOX360)
|
||||
#if defined(__CELLOS_LV2__) || defined(GEKKO) || defined(_XBOX)
|
||||
#include "../../benchmark.c"
|
||||
#endif
|
||||
|
||||
|
@ -37,7 +37,7 @@ enum
|
||||
|
||||
enum
|
||||
{
|
||||
RETRO_DEVICE_ID_JOYPAD_ANALOG_LEFT_DPAD_LEFT = RARCH_FIRST_ANALOG_BIND,
|
||||
RETRO_DEVICE_ID_JOYPAD_ANALOG_LEFT_DPAD_LEFT = RARCH_FIRST_CUSTOM_BIND,
|
||||
RETRO_DEVICE_ID_JOYPAD_ANALOG_LEFT_DPAD_RIGHT,
|
||||
RETRO_DEVICE_ID_JOYPAD_ANALOG_LEFT_DPAD_UP,
|
||||
RETRO_DEVICE_ID_JOYPAD_ANALOG_LEFT_DPAD_DOWN,
|
||||
|
Loading…
Reference in New Issue
Block a user