From 9653e1f028636b6222073c0836e219e52d384962 Mon Sep 17 00:00:00 2001 From: TwinAphex51224 Date: Thu, 29 Mar 2012 12:14:12 +0200 Subject: [PATCH] (360) Dodge function pointers / make direct calls through HAVE_GRIFFIN define --- console/griffin/hook.h | 18 ++++++++++++++++++ msvc-360/SSNES-360/SSNES-360.vcxproj | 12 ++++++------ 2 files changed, 24 insertions(+), 6 deletions(-) diff --git a/console/griffin/hook.h b/console/griffin/hook.h index 95ef64b5e0..655811e629 100644 --- a/console/griffin/hook.h +++ b/console/griffin/hook.h @@ -44,4 +44,22 @@ ps3_input_state(driver.input_data, snes_keybinds, port, device, index, id) #define input_key_pressed_func(key) ps3_key_pressed(driver.input_data, key) #define input_free_func() ps3_free_input(driver.input_data) + +#elif defined(_XBOX) /* Xbox 360 */ +#define video_init_func(video_info, input, input_data) \ + xdk360_gfx_init(video_info, input, input_data) +#define video_frame_func(data, width, height, pitch, msg) \ + xdk360_gfx_frame(driver.video_data, data, width, height, pitch, msg) +#define video_set_nonblock_state_func(state) driver.video->set_nonblock_state(driver.video_data, state) +#define video_alive_func() xdk360_gfx_alive(driver.video_data) +#define video_focus_func() xdk360_gfx_focus(driver.video_data) +#define video_xml_shader_func(path) driver.video->xml_shader(driver.video_data, path) +#define video_free_func() xdk360_gfx_free(driver.video_data) + +#define input_init_func() xdk360_input_initialize() +#define input_poll_func() xdk360_input_poll(driver.input_data) +#define input_input_state_func(snes_keybinds, port, device, index, id) \ + xdk360_input_state(driver.input_data, snes_keybinds, port, device, index, id) +#define input_key_pressed_func(key) xdk360_key_pressed(driver.input_data, key) +#define input_free_func() xdk360_free_input(driver.input_data) #endif diff --git a/msvc-360/SSNES-360/SSNES-360.vcxproj b/msvc-360/SSNES-360/SSNES-360.vcxproj index f90d26ca35..aeefe0065c 100644 --- a/msvc-360/SSNES-360/SSNES-360.vcxproj +++ b/msvc-360/SSNES-360/SSNES-360.vcxproj @@ -112,7 +112,7 @@ true false MultiThreadedDebug - _DEBUG;_XBOX;PACKAGE_VERSION="0.9.5";%(PreprocessorDefinitions);_CRT_SECURE_NO_WARNINGS;main=ssnes_main;SSNES_CONSOLE;HAVE_CONFIGFILE;HAVE_NETPLAY;HAVE_SOCKET_LEGACY;HAVE_ZLIB;D3DCOMPILE_USEVOIDS + _DEBUG;_XBOX;PACKAGE_VERSION="0.9.5";%(PreprocessorDefinitions);_CRT_SECURE_NO_WARNINGS;main=ssnes_main;SSNES_CONSOLE;HAVE_CONFIGFILE;HAVE_NETPLAY;HAVE_SOCKET_LEGACY;HAVE_ZLIB;D3DCOMPILE_USEVOIDS;HAVE_GRIFFIN Callcap @@ -150,7 +150,7 @@ AnalyzeOnly false MultiThreadedDebug - _DEBUG;_XBOX;%(PreprocessorDefinitions);PACKAGE_VERSION="0.9.5";_CRT_SECURE_NO_WARNINGS;main=ssnes_main;HAVE_CONFIGFILE;SSNES_CONSOLE;HAVE_ZLIB;D3DCOMPILE_USEVOIDS + _DEBUG;_XBOX;%(PreprocessorDefinitions);PACKAGE_VERSION="0.9.5";_CRT_SECURE_NO_WARNINGS;main=ssnes_main;HAVE_CONFIGFILE;SSNES_CONSOLE;HAVE_ZLIB;D3DCOMPILE_USEVOIDS;HAVE_GRIFFIN Callcap @@ -189,7 +189,7 @@ Size false MultiThreaded - NDEBUG;_XBOX;PROFILE;%(PreprocessorDefinitions);PACKAGE_VERSION="0.9.5";_CRT_SECURE_NO_WARNINGS;SSNES_CONSOLE;main=ssnes_main;HAVE_CONFIGFILE;HAVE_ZLIB;D3DCOMPILE_USEVOIDS + NDEBUG;_XBOX;PROFILE;%(PreprocessorDefinitions);PACKAGE_VERSION="0.9.5";_CRT_SECURE_NO_WARNINGS;SSNES_CONSOLE;main=ssnes_main;HAVE_CONFIGFILE;HAVE_ZLIB;D3DCOMPILE_USEVOIDS;HAVE_GRIFFIN Callcap @@ -233,7 +233,7 @@ Size false MultiThreaded - NDEBUG;_XBOX;PROFILE;FASTCAP;%(PreprocessorDefinitions);PACKAGE_VERSION="0.9.5";_CRT_SECURE_NO_WARNINGS;main=ssnes_main;HAVE_CONFIGFILE;HAVE_ZLIB;D3DCOMPILE_USEVOIDS + NDEBUG;_XBOX;PROFILE;FASTCAP;%(PreprocessorDefinitions);PACKAGE_VERSION="0.9.5";_CRT_SECURE_NO_WARNINGS;main=ssnes_main;HAVE_CONFIGFILE;HAVE_ZLIB;D3DCOMPILE_USEVOIDS;HAVE_GRIFFIN true @@ -274,7 +274,7 @@ false false MultiThreaded - NDEBUG;_XBOX;%(PreprocessorDefinitions);PACKAGE_VERSION="0.9.5";_CRT_SECURE_NO_WARNINGS;main=ssnes_main;SSNES_CONSOLE=1;HAVE_CONFIGFILE;HAVE_NETPLAY;HAVE_SOCKET_LEGACY;HAVE_ZLIB;D3DCOMPILE_USEVOIDS + NDEBUG;_XBOX;%(PreprocessorDefinitions);PACKAGE_VERSION="0.9.5";_CRT_SECURE_NO_WARNINGS;main=ssnes_main;SSNES_CONSOLE=1;HAVE_CONFIGFILE;HAVE_NETPLAY;HAVE_SOCKET_LEGACY;HAVE_ZLIB;D3DCOMPILE_USEVOIDS;HAVE_GRIFFIN true @@ -315,7 +315,7 @@ false false MultiThreaded - NDEBUG;_XBOX;LTCG;%(PreprocessorDefinitions);PACKAGE_VERSION="0.9.5";_CRT_SECURE_NO_WARNINGS;SSNES_CONSOLE;main=ssnes_main;HAVE_CONFIGFILE;HAVE_NETPLAY;HAVE_SOCKET_LEGACY;HAVE_ZLIB;D3DCOMPILE_USEVOIDS + NDEBUG;_XBOX;LTCG;%(PreprocessorDefinitions);PACKAGE_VERSION="0.9.5";_CRT_SECURE_NO_WARNINGS;SSNES_CONSOLE;main=ssnes_main;HAVE_CONFIGFILE;HAVE_NETPLAY;HAVE_SOCKET_LEGACY;HAVE_ZLIB;D3DCOMPILE_USEVOIDS;HAVE_GRIFFIN true