RetroArch
Classes | Macros | Typedefs | Enumerations | Functions
retroarch.h File Reference
#include <stdint.h>
#include <stddef.h>
#include <stdlib.h>
#include <retro_common_api.h>
#include <boolean.h>
#include "core_type.h"
#include "core.h"
Include dependency graph for retroarch.h:

Go to the source code of this file.

Classes

struct  rarch_main_wrap
 
struct  rarch_resolution
 
struct  global
 

Macros

#define RETRO_ENVIRONMENT_RETROARCH_START_BLOCK   0x800000
 
#define RETRO_ENVIRONMENT_SET_SAVE_STATE_IN_BACKGROUND   (2 | RETRO_ENVIRONMENT_RETROARCH_START_BLOCK)
 
#define RETRO_ENVIRONMENT_GET_CLEAR_ALL_THREAD_WAITS_CB   (3 | RETRO_ENVIRONMENT_RETROARCH_START_BLOCK)
 

Typedefs

typedef struct rarch_resolution rarch_resolution_t
 
typedef struct global global_t
 

Enumerations

enum  rarch_ctl_state {
  RARCH_CTL_NONE = 0, RARCH_CTL_INIT, RARCH_CTL_MAIN_DEINIT, RARCH_CTL_IS_INITED,
  RARCH_CTL_IS_DUMMY_CORE, RARCH_CTL_PREINIT, RARCH_CTL_DESTROY, RARCH_CTL_IS_BPS_PREF,
  RARCH_CTL_UNSET_BPS_PREF, RARCH_CTL_IS_PATCH_BLOCKED, RARCH_CTL_SET_PATCH_BLOCKED, RARCH_CTL_UNSET_PATCH_BLOCKED,
  RARCH_CTL_IS_UPS_PREF, RARCH_CTL_UNSET_UPS_PREF, RARCH_CTL_IS_IPS_PREF, RARCH_CTL_UNSET_IPS_PREF,
  RARCH_CTL_IS_SRAM_USED, RARCH_CTL_SET_SRAM_ENABLE, RARCH_CTL_SET_SRAM_ENABLE_FORCE, RARCH_CTL_UNSET_SRAM_ENABLE,
  RARCH_CTL_IS_SRAM_LOAD_DISABLED, RARCH_CTL_IS_SRAM_SAVE_DISABLED, RARCH_CTL_SET_BLOCK_CONFIG_READ, RARCH_CTL_UNSET_BLOCK_CONFIG_READ,
  RARCH_CTL_IS_BLOCK_CONFIG_READ, RARCH_CTL_HAS_SET_USERNAME, RARCH_CTL_USERNAME_SET, RARCH_CTL_USERNAME_UNSET,
  RARCH_CTL_SET_FRAME_LIMIT, RARCH_CTL_TASK_INIT, RARCH_CTL_FRAME_TIME_FREE, RARCH_CTL_SET_FRAME_TIME_LAST,
  RARCH_CTL_SET_FRAME_TIME, RARCH_CTL_IS_IDLE, RARCH_CTL_SET_IDLE, RARCH_CTL_GET_WINDOWED_SCALE,
  RARCH_CTL_SET_WINDOWED_SCALE, RARCH_CTL_IS_OVERRIDES_ACTIVE, RARCH_CTL_SET_OVERRIDES_ACTIVE, RARCH_CTL_UNSET_OVERRIDES_ACTIVE,
  RARCH_CTL_IS_REMAPS_CORE_ACTIVE, RARCH_CTL_SET_REMAPS_CORE_ACTIVE, RARCH_CTL_UNSET_REMAPS_CORE_ACTIVE, RARCH_CTL_IS_REMAPS_CONTENT_DIR_ACTIVE,
  RARCH_CTL_SET_REMAPS_CONTENT_DIR_ACTIVE, RARCH_CTL_UNSET_REMAPS_CONTENT_DIR_ACTIVE, RARCH_CTL_IS_REMAPS_GAME_ACTIVE, RARCH_CTL_SET_REMAPS_GAME_ACTIVE,
  RARCH_CTL_UNSET_REMAPS_GAME_ACTIVE, RARCH_CTL_IS_MISSING_BIOS, RARCH_CTL_SET_MISSING_BIOS, RARCH_CTL_UNSET_MISSING_BIOS,
  RARCH_CTL_IS_GAME_OPTIONS_ACTIVE, RARCH_CTL_IS_NONBLOCK_FORCED, RARCH_CTL_SET_NONBLOCK_FORCED, RARCH_CTL_UNSET_NONBLOCK_FORCED,
  RARCH_CTL_SET_LIBRETRO_PATH, RARCH_CTL_IS_PAUSED, RARCH_CTL_SET_PAUSED, RARCH_CTL_SET_CORE_SHUTDOWN,
  RARCH_CTL_SET_SHUTDOWN, RARCH_CTL_IS_SHUTDOWN, RARCH_CTL_STATE_FREE, RARCH_CTL_GET_PERFCNT,
  RARCH_CTL_SET_PERFCNT_ENABLE, RARCH_CTL_UNSET_PERFCNT_ENABLE, RARCH_CTL_IS_PERFCNT_ENABLE, RARCH_CTL_FRONTEND_KEY_EVENT_GET,
  RARCH_CTL_KEY_EVENT_GET, RARCH_CTL_DATA_DEINIT, RARCH_CTL_HAS_CORE_OPTIONS, RARCH_CTL_GET_CORE_OPTION_SIZE,
  RARCH_CTL_IS_CORE_OPTION_UPDATED, RARCH_CTL_CORE_OPTIONS_LIST_GET, RARCH_CTL_CORE_OPTION_PREV, RARCH_CTL_CORE_OPTION_NEXT,
  RARCH_CTL_CORE_OPTIONS_GET, RARCH_CTL_CORE_OPTIONS_INIT, RARCH_CTL_CORE_OPTIONS_DEINIT, RARCH_CTL_SYSTEM_INFO_INIT,
  RARCH_CTL_SYSTEM_INFO_FREE, RARCH_CTL_HTTPSERVER_INIT, RARCH_CTL_HTTPSERVER_DESTROY
}
 
enum  rarch_capabilities { RARCH_CAPABILITIES_NONE = 0, RARCH_CAPABILITIES_CPU, RARCH_CAPABILITIES_COMPILER }
 
enum  rarch_override_setting {
  RARCH_OVERRIDE_SETTING_NONE = 0, RARCH_OVERRIDE_SETTING_LIBRETRO, RARCH_OVERRIDE_SETTING_VERBOSITY, RARCH_OVERRIDE_SETTING_LIBRETRO_DIRECTORY,
  RARCH_OVERRIDE_SETTING_SAVE_PATH, RARCH_OVERRIDE_SETTING_STATE_PATH, RARCH_OVERRIDE_SETTING_NETPLAY_MODE, RARCH_OVERRIDE_SETTING_NETPLAY_IP_ADDRESS,
  RARCH_OVERRIDE_SETTING_NETPLAY_IP_PORT, RARCH_OVERRIDE_SETTING_NETPLAY_STATELESS_MODE, RARCH_OVERRIDE_SETTING_NETPLAY_CHECK_FRAMES, RARCH_OVERRIDE_SETTING_UPS_PREF,
  RARCH_OVERRIDE_SETTING_BPS_PREF, RARCH_OVERRIDE_SETTING_IPS_PREF, RARCH_OVERRIDE_SETTING_LIBRETRO_DEVICE, RARCH_OVERRIDE_SETTING_LAST
}
 
enum  runloop_action { RUNLOOP_ACTION_NONE = 0, RUNLOOP_ACTION_AUTOSAVE }
 

Functions

bool rarch_ctl (enum rarch_ctl_state state, void *data)
 
int retroarch_get_capabilities (enum rarch_capabilities type, char *s, size_t len)
 
void retroarch_override_setting_set (enum rarch_override_setting enum_idx, void *data)
 
void retroarch_override_setting_unset (enum rarch_override_setting enum_idx, void *data)
 
bool retroarch_override_setting_is_set (enum rarch_override_setting enum_idx, void *data)
 
bool retroarch_validate_game_options (char *s, size_t len, bool mkdir)
 
bool retroarch_is_forced_fullscreen (void)
 
void retroarch_unset_forced_fullscreen (void)
 
void retroarch_set_current_core_type (enum rarch_core_type type, bool explicitly_set)
 
void retroarch_set_shader_preset (const char *preset)
 
void retroarch_unset_shader_preset (void)
 
char * retroarch_get_shader_preset (void)
 
bool retroarch_is_switching_display_mode (void)
 
void retroarch_set_switching_display_mode (void)
 
void retroarch_unset_switching_display_mode (void)
 
void retroarch_fail (int error_code, const char *error)
 
bool retroarch_main_init (int argc, char *argv[])
 
bool retroarch_main_quit (void)
 
global_tglobal_get_ptr (void)
 
int runloop_iterate (unsigned *sleep_ms)
 
void runloop_msg_queue_push (const char *msg, unsigned prio, unsigned duration, bool flush)
 
bool runloop_msg_queue_pull (const char **ret)
 
void runloop_get_status (bool *is_paused, bool *is_idle, bool *is_slowmotion, bool *is_perfcnt_enable)
 
void runloop_set (enum runloop_action action)
 
void runloop_unset (enum runloop_action action)
 
void rarch_menu_running (void)
 
void rarch_menu_running_finished (void)
 
bool retroarch_is_on_main_thread (void)
 
rarch_system_info_trunloop_get_system_info (void)
 
struct retro_system_inforunloop_get_libretro_system_info (void)
 

Macro Definition Documentation

◆ RETRO_ENVIRONMENT_GET_CLEAR_ALL_THREAD_WAITS_CB

#define RETRO_ENVIRONMENT_GET_CLEAR_ALL_THREAD_WAITS_CB   (3 | RETRO_ENVIRONMENT_RETROARCH_START_BLOCK)

◆ RETRO_ENVIRONMENT_RETROARCH_START_BLOCK

#define RETRO_ENVIRONMENT_RETROARCH_START_BLOCK   0x800000

◆ RETRO_ENVIRONMENT_SET_SAVE_STATE_IN_BACKGROUND

#define RETRO_ENVIRONMENT_SET_SAVE_STATE_IN_BACKGROUND   (2 | RETRO_ENVIRONMENT_RETROARCH_START_BLOCK)

Typedef Documentation

◆ global_t

typedef struct global global_t

◆ rarch_resolution_t

Enumeration Type Documentation

◆ rarch_capabilities

Enumerator
RARCH_CAPABILITIES_NONE 
RARCH_CAPABILITIES_CPU 
RARCH_CAPABILITIES_COMPILER 

◆ rarch_ctl_state

Enumerator
RARCH_CTL_NONE 
RARCH_CTL_INIT 
RARCH_CTL_MAIN_DEINIT 
RARCH_CTL_IS_INITED 
RARCH_CTL_IS_DUMMY_CORE 
RARCH_CTL_PREINIT 
RARCH_CTL_DESTROY 
RARCH_CTL_IS_BPS_PREF 
RARCH_CTL_UNSET_BPS_PREF 
RARCH_CTL_IS_PATCH_BLOCKED 
RARCH_CTL_SET_PATCH_BLOCKED 
RARCH_CTL_UNSET_PATCH_BLOCKED 
RARCH_CTL_IS_UPS_PREF 
RARCH_CTL_UNSET_UPS_PREF 
RARCH_CTL_IS_IPS_PREF 
RARCH_CTL_UNSET_IPS_PREF 
RARCH_CTL_IS_SRAM_USED 
RARCH_CTL_SET_SRAM_ENABLE 
RARCH_CTL_SET_SRAM_ENABLE_FORCE 
RARCH_CTL_UNSET_SRAM_ENABLE 
RARCH_CTL_IS_SRAM_LOAD_DISABLED 
RARCH_CTL_IS_SRAM_SAVE_DISABLED 
RARCH_CTL_SET_BLOCK_CONFIG_READ 
RARCH_CTL_UNSET_BLOCK_CONFIG_READ 
RARCH_CTL_IS_BLOCK_CONFIG_READ 
RARCH_CTL_HAS_SET_USERNAME 
RARCH_CTL_USERNAME_SET 
RARCH_CTL_USERNAME_UNSET 
RARCH_CTL_SET_FRAME_LIMIT 
RARCH_CTL_TASK_INIT 
RARCH_CTL_FRAME_TIME_FREE 
RARCH_CTL_SET_FRAME_TIME_LAST 
RARCH_CTL_SET_FRAME_TIME 
RARCH_CTL_IS_IDLE 
RARCH_CTL_SET_IDLE 
RARCH_CTL_GET_WINDOWED_SCALE 
RARCH_CTL_SET_WINDOWED_SCALE 
RARCH_CTL_IS_OVERRIDES_ACTIVE 
RARCH_CTL_SET_OVERRIDES_ACTIVE 
RARCH_CTL_UNSET_OVERRIDES_ACTIVE 
RARCH_CTL_IS_REMAPS_CORE_ACTIVE 
RARCH_CTL_SET_REMAPS_CORE_ACTIVE 
RARCH_CTL_UNSET_REMAPS_CORE_ACTIVE 
RARCH_CTL_IS_REMAPS_CONTENT_DIR_ACTIVE 
RARCH_CTL_SET_REMAPS_CONTENT_DIR_ACTIVE 
RARCH_CTL_UNSET_REMAPS_CONTENT_DIR_ACTIVE 
RARCH_CTL_IS_REMAPS_GAME_ACTIVE 
RARCH_CTL_SET_REMAPS_GAME_ACTIVE 
RARCH_CTL_UNSET_REMAPS_GAME_ACTIVE 
RARCH_CTL_IS_MISSING_BIOS 
RARCH_CTL_SET_MISSING_BIOS 
RARCH_CTL_UNSET_MISSING_BIOS 
RARCH_CTL_IS_GAME_OPTIONS_ACTIVE 
RARCH_CTL_IS_NONBLOCK_FORCED 
RARCH_CTL_SET_NONBLOCK_FORCED 
RARCH_CTL_UNSET_NONBLOCK_FORCED 
RARCH_CTL_SET_LIBRETRO_PATH 
RARCH_CTL_IS_PAUSED 
RARCH_CTL_SET_PAUSED 
RARCH_CTL_SET_CORE_SHUTDOWN 
RARCH_CTL_SET_SHUTDOWN 
RARCH_CTL_IS_SHUTDOWN 
RARCH_CTL_STATE_FREE 
RARCH_CTL_GET_PERFCNT 
RARCH_CTL_SET_PERFCNT_ENABLE 
RARCH_CTL_UNSET_PERFCNT_ENABLE 
RARCH_CTL_IS_PERFCNT_ENABLE 
RARCH_CTL_FRONTEND_KEY_EVENT_GET 
RARCH_CTL_KEY_EVENT_GET 
RARCH_CTL_DATA_DEINIT 
RARCH_CTL_HAS_CORE_OPTIONS 
RARCH_CTL_GET_CORE_OPTION_SIZE 
RARCH_CTL_IS_CORE_OPTION_UPDATED 
RARCH_CTL_CORE_OPTIONS_LIST_GET 
RARCH_CTL_CORE_OPTION_PREV 
RARCH_CTL_CORE_OPTION_NEXT 
RARCH_CTL_CORE_OPTIONS_GET 
RARCH_CTL_CORE_OPTIONS_INIT 
RARCH_CTL_CORE_OPTIONS_DEINIT 
RARCH_CTL_SYSTEM_INFO_INIT 
RARCH_CTL_SYSTEM_INFO_FREE 
RARCH_CTL_HTTPSERVER_INIT 
RARCH_CTL_HTTPSERVER_DESTROY 

◆ rarch_override_setting

Enumerator
RARCH_OVERRIDE_SETTING_NONE 
RARCH_OVERRIDE_SETTING_LIBRETRO 
RARCH_OVERRIDE_SETTING_VERBOSITY 
RARCH_OVERRIDE_SETTING_LIBRETRO_DIRECTORY 
RARCH_OVERRIDE_SETTING_SAVE_PATH 
RARCH_OVERRIDE_SETTING_STATE_PATH 
RARCH_OVERRIDE_SETTING_NETPLAY_MODE 
RARCH_OVERRIDE_SETTING_NETPLAY_IP_ADDRESS 
RARCH_OVERRIDE_SETTING_NETPLAY_IP_PORT 
RARCH_OVERRIDE_SETTING_NETPLAY_STATELESS_MODE 
RARCH_OVERRIDE_SETTING_NETPLAY_CHECK_FRAMES 
RARCH_OVERRIDE_SETTING_UPS_PREF 
RARCH_OVERRIDE_SETTING_BPS_PREF 
RARCH_OVERRIDE_SETTING_IPS_PREF 
RARCH_OVERRIDE_SETTING_LIBRETRO_DEVICE 
RARCH_OVERRIDE_SETTING_LAST 

◆ runloop_action

Enumerator
RUNLOOP_ACTION_NONE 
RUNLOOP_ACTION_AUTOSAVE 

Function Documentation

◆ global_get_ptr()

global_t* global_get_ptr ( void  )

◆ rarch_ctl()

bool rarch_ctl ( enum rarch_ctl_state  state,
void data 
)
Here is the call graph for this function:

◆ rarch_menu_running()

void rarch_menu_running ( void  )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rarch_menu_running_finished()

void rarch_menu_running_finished ( void  )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ retroarch_fail()

void retroarch_fail ( int  error_code,
const char *  error 
)

retroarch_fail: : Error code. : Error message to show.

Sanely kills the program.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ retroarch_get_capabilities()

int retroarch_get_capabilities ( enum rarch_capabilities  type,
char *  s,
size_t  len 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ retroarch_get_shader_preset()

char* retroarch_get_shader_preset ( void  )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ retroarch_is_forced_fullscreen()

bool retroarch_is_forced_fullscreen ( void  )
Here is the caller graph for this function:

◆ retroarch_is_on_main_thread()

bool retroarch_is_on_main_thread ( void  )

◆ retroarch_is_switching_display_mode()

bool retroarch_is_switching_display_mode ( void  )
Here is the caller graph for this function:

◆ retroarch_main_init()

bool retroarch_main_init ( int  argc,
char *  argv[] 
)

retroarch_main_init: : Count of (commandline) arguments. : (Commandline) arguments.

Initializes the program.

Returns: 1 (true) on success, otherwise false (0) if there was an error.

retroarch_main_init: : Count of (commandline) arguments. : (Commandline) arguments.

Initializes the program.

Returns: true on success, otherwise false if there was an error.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ retroarch_main_quit()

bool retroarch_main_quit ( void  )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ retroarch_override_setting_is_set()

bool retroarch_override_setting_is_set ( enum rarch_override_setting  enum_idx,
void data 
)
Here is the caller graph for this function:

◆ retroarch_override_setting_set()

void retroarch_override_setting_set ( enum rarch_override_setting  enum_idx,
void data 
)
Here is the caller graph for this function:

◆ retroarch_override_setting_unset()

void retroarch_override_setting_unset ( enum rarch_override_setting  enum_idx,
void data 
)
Here is the caller graph for this function:

◆ retroarch_set_current_core_type()

void retroarch_set_current_core_type ( enum rarch_core_type  type,
bool  explicitly_set 
)
Here is the caller graph for this function:

◆ retroarch_set_shader_preset()

void retroarch_set_shader_preset ( const char *  preset)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ retroarch_set_switching_display_mode()

void retroarch_set_switching_display_mode ( void  )
Here is the caller graph for this function:

◆ retroarch_unset_forced_fullscreen()

void retroarch_unset_forced_fullscreen ( void  )
Here is the caller graph for this function:

◆ retroarch_unset_shader_preset()

void retroarch_unset_shader_preset ( void  )
Here is the caller graph for this function:

◆ retroarch_unset_switching_display_mode()

void retroarch_unset_switching_display_mode ( void  )
Here is the caller graph for this function:

◆ retroarch_validate_game_options()

bool retroarch_validate_game_options ( char *  s,
size_t  len,
bool  mkdir 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ runloop_get_libretro_system_info()

struct retro_system_info* runloop_get_libretro_system_info ( void  )
Here is the caller graph for this function:

◆ runloop_get_status()

void runloop_get_status ( bool is_paused,
bool is_idle,
bool is_slowmotion,
bool is_perfcnt_enable 
)
Here is the caller graph for this function:

◆ runloop_get_system_info()

rarch_system_info_t* runloop_get_system_info ( void  )
Here is the caller graph for this function:

◆ runloop_iterate()

int runloop_iterate ( unsigned *  sleep_ms)

runloop_iterate:

Run Libretro core in RetroArch for one frame.

Returns: 0 on successful run, Returns 1 if we have to wait until button input in order to wake up the loop. Returns -1 if we forcibly quit out of the RetroArch iteration loop.

runloop_iterate:

Run Libretro core in RetroArch for one frame.

Returns: 0 on success, 1 if we have to wait until button input in order to wake up the loop, -1 if we forcibly quit out of the RetroArch iteration loop.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ runloop_msg_queue_pull()

bool runloop_msg_queue_pull ( const char **  ret)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ runloop_msg_queue_push()

void runloop_msg_queue_push ( const char *  msg,
unsigned  prio,
unsigned  duration,
bool  flush 
)
Here is the call graph for this function:

◆ runloop_set()

void runloop_set ( enum runloop_action  action)
Here is the caller graph for this function:

◆ runloop_unset()

void runloop_unset ( enum runloop_action  action)
Here is the caller graph for this function: