2012-04-03 17:19:18 +00:00
|
|
|
/* SSNES - A frontend for libretro.
|
2012-01-08 00:08:18 +00:00
|
|
|
* Copyright (C) 2010-2012 - Hans-Kristian Arntzen
|
2010-12-30 12:54:49 +00:00
|
|
|
*
|
2012-04-03 17:08:47 +00:00
|
|
|
|
2010-12-30 12:54:49 +00:00
|
|
|
*
|
|
|
|
* SSNES is free software: you can redistribute it and/or modify it under the terms
|
|
|
|
* of the GNU General Public License as published by the Free Software Found-
|
|
|
|
* ation, either version 3 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* SSNES is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
|
|
|
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
|
|
|
* PURPOSE. See the GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License along with SSNES.
|
|
|
|
* If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __DYNAMIC_H
|
|
|
|
#define __DYNAMIC_H
|
|
|
|
|
2011-12-24 12:46:12 +00:00
|
|
|
#include "boolean.h"
|
2012-04-05 09:47:43 +00:00
|
|
|
#include "libretro.h"
|
2010-12-30 12:54:49 +00:00
|
|
|
|
2011-12-01 21:36:26 +00:00
|
|
|
#ifdef HAVE_CONFIG_H
|
|
|
|
#include "config.h"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if defined(HAVE_DYNAMIC) || defined(HAVE_DYLIB)
|
|
|
|
#define NEED_DYNAMIC
|
|
|
|
#else
|
|
|
|
#undef NEED_DYNAMIC
|
|
|
|
#endif
|
|
|
|
|
2012-04-05 09:47:43 +00:00
|
|
|
void init_libretro_sym(void);
|
|
|
|
void uninit_libretro_sym(void);
|
2010-12-30 12:54:49 +00:00
|
|
|
|
2011-03-07 19:05:03 +00:00
|
|
|
typedef void *dylib_t;
|
2011-12-01 21:36:26 +00:00
|
|
|
#ifdef NEED_DYNAMIC
|
2011-05-31 13:03:59 +00:00
|
|
|
typedef void (*function_t)(void);
|
2011-03-07 18:12:14 +00:00
|
|
|
|
|
|
|
dylib_t dylib_load(const char *path);
|
|
|
|
void dylib_close(dylib_t lib);
|
2011-05-31 13:03:59 +00:00
|
|
|
function_t dylib_proc(dylib_t lib, const char *proc);
|
2011-12-01 21:36:26 +00:00
|
|
|
#endif
|
2011-03-07 18:12:14 +00:00
|
|
|
|
2012-04-05 09:47:43 +00:00
|
|
|
extern void (*pretro_init)(void);
|
|
|
|
extern void (*pretro_deinit)(void);
|
2010-12-30 12:54:49 +00:00
|
|
|
|
2012-04-05 09:47:43 +00:00
|
|
|
extern unsigned (*pretro_api_version)(void);
|
2010-12-30 12:54:49 +00:00
|
|
|
|
2012-04-05 09:47:43 +00:00
|
|
|
extern void (*pretro_get_system_info)(struct retro_system_info*);
|
|
|
|
extern void (*pretro_get_system_av_info)(struct retro_system_av_info*);
|
2011-04-17 11:30:59 +00:00
|
|
|
|
2012-04-05 09:47:43 +00:00
|
|
|
extern void (*pretro_set_environment)(retro_environment_t);
|
|
|
|
extern void (*pretro_set_video_refresh)(retro_video_refresh_t);
|
|
|
|
extern void (*pretro_set_audio_sample)(retro_audio_sample_t);
|
|
|
|
extern void (*pretro_set_audio_sample_batch)(retro_audio_sample_batch_t);
|
|
|
|
extern void (*pretro_set_input_poll)(retro_input_poll_t);
|
|
|
|
extern void (*pretro_set_input_state)(retro_input_state_t);
|
2010-12-30 12:54:49 +00:00
|
|
|
|
2012-04-05 09:47:43 +00:00
|
|
|
extern void (*pretro_set_controller_port_device)(bool, unsigned);
|
2011-01-12 18:24:20 +00:00
|
|
|
|
2012-04-05 09:47:43 +00:00
|
|
|
extern void (*pretro_reset)(void);
|
|
|
|
extern void (*pretro_run)(void);
|
2010-12-30 12:54:49 +00:00
|
|
|
|
2012-04-05 09:47:43 +00:00
|
|
|
extern size_t (*pretro_serialize_size)(void);
|
|
|
|
extern bool (*pretro_serialize)(void*, size_t);
|
|
|
|
extern bool (*pretro_unserialize)(const void*, size_t);
|
2011-01-11 15:53:31 +00:00
|
|
|
|
2012-04-05 09:47:43 +00:00
|
|
|
extern void (*pretro_cheat_reset)(void);
|
|
|
|
extern void (*pretro_cheat_set)(unsigned, bool, const char*);
|
2010-12-30 12:54:49 +00:00
|
|
|
|
2012-04-05 09:47:43 +00:00
|
|
|
extern bool (*pretro_load_game)(const struct retro_game_info*);
|
|
|
|
extern bool (*pretro_load_game_special)(unsigned, const struct retro_game_info*, size_t);
|
2010-12-30 12:54:49 +00:00
|
|
|
|
2012-04-05 09:47:43 +00:00
|
|
|
extern void (*pretro_unload_game)(void);
|
2010-12-30 12:54:49 +00:00
|
|
|
|
2012-04-05 09:47:43 +00:00
|
|
|
extern unsigned (*pretro_get_region)(void);
|
2010-12-30 12:54:49 +00:00
|
|
|
|
2012-04-05 09:47:43 +00:00
|
|
|
extern void *(*pretro_get_memory_data)(unsigned);
|
|
|
|
extern size_t (*pretro_get_memory_size)(unsigned);
|
2010-12-30 12:54:49 +00:00
|
|
|
|
|
|
|
#endif
|
|
|
|
|