(Android) Have Android port use null video/input/audio drivers

for now - also changed some things in Griffin so things work again
after null drivers commit
This commit is contained in:
Twinaphex 2012-06-20 06:39:52 +02:00
parent acda9dea35
commit 0c7af232cc
6 changed files with 41 additions and 9 deletions

View File

@ -7,6 +7,6 @@ include $(CLEAR_VARS)
LOCAL_MODULE := retroarch
LOCAL_SRC_FILES = ../../console/griffin/griffin.c ../../console/rzlib/rzlib.c
LOCAL_CFLAGS = -DINLINE=inline -DRARCH_CONSOLE -DLSB_FIRST -D__LIBRETRO__ -DHAVE_CONFIGFILE=1 -DHAVE_GRIFFIN=1 -DPACKAGE_VERSION=\"$(RARCH_VERSION)\" -Dmain=rarch_main -std=gnu99
LOCAL_CFLAGS = -DANDROID -DHAVE_DYNAMIC -DHAVE_ZLIB -DINLINE=inline -DRARCH_CONSOLE -DLSB_FIRST -D__LIBRETRO__ -DHAVE_CONFIGFILE=1 -DHAVE_GRIFFIN=1 -DPACKAGE_VERSION=\"$(RARCH_VERSION)\" -Dmain=rarch_main -std=gnu99
include $(BUILD_SHARED_LIBRARY)

View File

@ -52,7 +52,7 @@ const char *rarch_console_get_rom_ext(void)
const char *retval = NULL;
struct retro_system_info info;
retro_get_system_info(&info);
pretro_get_system_info(&info);
if (info.valid_extensions)
retval = info.valid_extensions;
@ -68,7 +68,7 @@ void rarch_console_name_from_id(char *name, size_t size)
return;
struct retro_system_info info;
retro_get_system_info(&info);
pretro_get_system_info(&info);
const char *id = info.library_name ? info.library_name : "Unknown";
if (!id || strlen(id) >= size)
@ -410,7 +410,6 @@ const char *rarch_input_find_platform_key_label(uint64_t joykey)
return "Unknown";
}
#endif
void rarch_input_set_keybind(unsigned player, unsigned keybind_action, uint64_t default_retro_joypad_id)
{
@ -445,10 +444,12 @@ void rarch_input_set_default_keybinds(unsigned player)
g_settings.input.dpad_emulation[player] = DPAD_EMULATION_LSTICK;
}
#endif
void rarch_input_set_default_keybind_names_for_emulator(void)
{
struct retro_system_info info;
retro_get_system_info(&info);
pretro_get_system_info(&info);
const char *id = info.library_name ? info.library_name : "Unknown";
// Genesis Plus GX/Next

View File

@ -148,6 +148,7 @@ int rarch_extract_zipfile(const char *zip_path);
INPUT EXTENSIONS
============================================================ */
#ifdef HAVE_DEFAULT_RETROPAD_INPUT
const char *rarch_input_find_platform_key_label(uint64_t joykey);
uint64_t rarch_input_find_previous_platform_key(uint64_t joykey);
uint64_t rarch_input_find_next_platform_key(uint64_t joykey);
@ -157,6 +158,7 @@ uint64_t rarch_input_find_next_platform_key(uint64_t joykey);
void rarch_input_set_default_keybind_names_for_emulator(void);
void rarch_input_set_keybind(unsigned player, unsigned keybind_action, uint64_t default_retro_joypad_id);
#endif
/*============================================================

View File

@ -19,7 +19,7 @@
/*============================================================
GENERAL
============================================================ */
#if defined(__CELLOS_LV2__) || defined(_XBOX) || defined(GEKKO)
#if defined(__CELLOS_LV2__) || defined(_XBOX) || defined(GEKKO) || defined(ANDROID)
#define HAVE_GRIFFIN_OVERRIDE_VIDEO_FRAME_FUNC 1
#endif

View File

@ -88,14 +88,14 @@ VIDEO DRIVER
#ifdef HAVE_OPENGL
#include "../../gfx/gl.c"
#endif
#if defined(_XBOX)
#elif defined(_XBOX)
#include "../../360/xdk360_video.cpp"
#elif defined(GEKKO)
#include "../../wii/video.c"
#endif
#include "../../gfx/null.c"
/*============================================================
FONTS
============================================================ */
@ -119,6 +119,8 @@ INPUT
#include "../../wii/input.c"
#endif
#include "../../input/null.c"
/*============================================================
STATE TRACKER
============================================================ */
@ -163,6 +165,8 @@ AUDIO
#include "../../wii/audio.c"
#endif
#include "../../audio/null.c"
/*============================================================
DYNAMIC
============================================================ */

View File

@ -103,4 +103,29 @@
#define input_free_func() wii_free_input(driver.input_data)
#define gfx_ctx_window_has_focus() (true)
#else
/*============================================================
NULL
============================================================ */
#define video_init_func(video_info, input, input_data) null_gfx_init(video_info, input, input_data)
#define video_frame_func(data, width, height, pitch, msg) \
null_gfx_frame(driver.video_data, data, width, height, pitch, msg)
#define video_set_nonblock_state_func(state) null_gfx_set_nonblock_state(driver.video_data, state)
#define video_alive_func() null_gfx_alive(driver.video_data)
#define video_focus_func() null_gfx_focus(driver.video_data)
#define video_xml_shader_func(path) driver.video->xml_shader(driver.video_data, path)
#define video_free_func() null_gfx_free(driver.video_data)
#define video_set_rotation_func(orientation) (true)
#define video_set_aspect_ratio_func(aspectratio_idx) (true)
#define input_init_func() null_input_init()
#define input_poll_func() null_input_poll(driver.input_data)
#define input_input_state_func(snes_keybinds, port, device, index, id) \
null_input_state(driver.input_data, snes_keybinds, port, device, index, id)
#define input_key_pressed_func(key) null_input_key_pressed(driver.input_data, key)
#define input_free_func() null_input_free(driver.input_data)
#define gfx_ctx_window_has_focus() (true)
#endif