RetroArch
Classes | Macros | Enumerations | Functions | Variables
command.c File Reference
#include <stdio.h>
#include <string.h>
#include <ctype.h>
#include <compat/strl.h>
#include <compat/posix_string.h>
#include <file/file_path.h>
#include <lists/dir_list.h>
#include <string/stdstring.h>
#include <streams/file_stream.h>
#include <streams/stdin_stream.h>
#include "midi/midi_driver.h"
#include "command.h"
#include "defaults.h"
#include "driver.h"
#include "input/input_driver.h"
#include "frontend/frontend_driver.h"
#include "audio/audio_driver.h"
#include "record/record_driver.h"
#include "file_path_special.h"
#include "autosave.h"
#include "core_info.h"
#include "core_type.h"
#include "performance_counters.h"
#include "dynamic.h"
#include "content.h"
#include "dirs.h"
#include "movie.h"
#include "paths.h"
#include "msg_hash.h"
#include "retroarch.h"
#include "managers/cheat_manager.h"
#include "managers/state_manager.h"
#include "ui/ui_companion_driver.h"
#include "tasks/tasks_internal.h"
#include "list_special.h"
#include "core.h"
#include "verbosity.h"
#include "configuration.h"
#include "input/input_remapping.h"
#include "version.h"
Include dependency graph for command.c:

Classes

struct  cmd_map
 
struct  command
 

Macros

#define DEFAULT_NETWORK_CMD_PORT   55355
 
#define STDIN_BUF_SIZE   4096
 

Enumerations

enum  cmd_source_t { CMD_NONE = 0, CMD_STDIN, CMD_NETWORK }
 

Functions

bool command_set_shader (const char *arg)
 
bool command_network_send (const char *cmd_)
 
command_tcommand_new (void)
 
bool command_network_new (command_t *handle, bool stdin_enable, bool network_enable, uint16_t port)
 
bool command_poll (command_t *handle)
 
bool command_get (command_handle_t *handle)
 
bool command_set (command_handle_t *handle)
 
bool command_free (command_t *handle)
 
static void command_event_disk_control_set_eject (bool new_state, bool print_log)
 
static void command_event_disk_control_set_index (unsigned idx)
 
static bool command_event_disk_control_append_image (const char *path)
 
static void command_event_check_disk_prev (const struct retro_disk_control_callback *control)
 
static void command_event_check_disk_next (const struct retro_disk_control_callback *control)
 
static void command_event_set_volume (float gain)
 
static void command_event_set_mixer_volume (float gain)
 
static void command_event_init_controllers (void)
 
static void command_event_deinit_core (bool reinit)
 
static void command_event_init_cheats (void)
 
static void command_event_load_auto_state (void)
 
static void command_event_set_savestate_auto_index (void)
 
static bool event_init_content (void)
 
static bool command_event_init_core (enum rarch_core_type *data)
 
static void command_event_disable_overrides (void)
 
static void command_event_restore_default_shader_preset (void)
 
static void command_event_restore_remaps (void)
 
static bool command_event_save_auto_state (void)
 
static bool command_event_save_config (const char *config_path, char *s, size_t len)
 
static bool command_event_save_core_config (void)
 
static void command_event_save_current_config (enum override_type type)
 
static void command_event_undo_save_state (char *s, size_t len)
 
static void command_event_undo_load_state (char *s, size_t len)
 
static bool command_event_main_state (unsigned cmd)
 
static bool command_event_resize_windowed_scale (void)
 
void command_playlist_push_write (playlist_t *playlist, const char *path, const char *label, const char *core_path, const char *core_name)
 
void command_playlist_update_write (playlist_t *plist, size_t idx, const char *path, const char *label, const char *core_path, const char *core_display_name, const char *crc32, const char *db_name)
 
bool command_event (enum event_command cmd, void *data)
 

Variables

bool discord_is_inited
 

Macro Definition Documentation

◆ DEFAULT_NETWORK_CMD_PORT

#define DEFAULT_NETWORK_CMD_PORT   55355

◆ STDIN_BUF_SIZE

#define STDIN_BUF_SIZE   4096

Enumeration Type Documentation

◆ cmd_source_t

Enumerator
CMD_NONE 
CMD_STDIN 
CMD_NETWORK 

Function Documentation

◆ command_event()

bool command_event ( enum event_command  cmd,
void data 
)

command_event: : Event command index.

Performs program event command with index .

Returns: true (1) on success, otherwise false (0).

◆ command_event_check_disk_next()

static void command_event_check_disk_next ( const struct retro_disk_control_callback control)
static

command_event_check_disk_next: : Handle to disk control handle.

Perform disk cycle to next index action (Core Disk Options).

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

◆ command_event_check_disk_prev()

static void command_event_check_disk_prev ( const struct retro_disk_control_callback control)
static

command_event_check_disk_prev: : Handle to disk control handle.

Perform disk cycle to previous index action (Core Disk Options).

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

◆ command_event_deinit_core()

static void command_event_deinit_core ( bool  reinit)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ command_event_disable_overrides()

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

◆ command_event_disk_control_append_image()

static bool command_event_disk_control_append_image ( const char *  path)
static

command_event_disk_control_append_image: : Path to disk image.

Appends disk image to disk image list.

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

◆ command_event_disk_control_set_eject()

static void command_event_disk_control_set_eject ( bool  new_state,
bool  print_log 
)
static

command_event_disk_control_set_eject: : Eject or close the virtual drive tray. false (0) : Close true (1) : Eject : Show message onscreen.

Ejects/closes of the virtual drive tray.

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

◆ command_event_disk_control_set_index()

static void command_event_disk_control_set_index ( unsigned  idx)
static

command_event_disk_control_set_index: : Index of disk to set as current.

Sets current disk to .

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

◆ command_event_init_cheats()

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

◆ command_event_init_controllers()

static void command_event_init_controllers ( void  )
static

command_event_init_controllers:

Initialize libretro controllers.

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

◆ command_event_init_core()

static bool command_event_init_core ( enum rarch_core_type data)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ command_event_load_auto_state()

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

◆ command_event_main_state()

static bool command_event_main_state ( unsigned  cmd)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ command_event_resize_windowed_scale()

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

◆ command_event_restore_default_shader_preset()

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

◆ command_event_restore_remaps()

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

◆ command_event_save_auto_state()

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

◆ command_event_save_config()

static bool command_event_save_config ( const char *  config_path,
char *  s,
size_t  len 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ command_event_save_core_config()

static bool command_event_save_core_config ( void  )
static

command_event_save_core_config:

Saves a new (core) configuration to a file. Filename is based on heuristics to avoid typing.

Returns: true (1) on success, otherwise false (0).

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

◆ command_event_save_current_config()

static void command_event_save_current_config ( enum override_type  type)
static

event_save_current_config:

Saves current configuration file to disk, and (optionally) autosave state.

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

◆ command_event_set_mixer_volume()

static void command_event_set_mixer_volume ( float  gain)
static

event_set_mixer_volume: : amount of gain to be applied to current volume level.

Adjusts the current audio volume level.

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

◆ command_event_set_savestate_auto_index()

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

◆ command_event_set_volume()

static void command_event_set_volume ( float  gain)
static

event_set_volume: : amount of gain to be applied to current volume level.

Adjusts the current audio volume level.

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

◆ command_event_undo_load_state()

static void command_event_undo_load_state ( char *  s,
size_t  len 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ command_event_undo_save_state()

static void command_event_undo_save_state ( char *  s,
size_t  len 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ command_free()

bool command_free ( command_t handle)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ command_get()

bool command_get ( command_handle_t handle)
Here is the caller graph for this function:

◆ command_network_new()

bool command_network_new ( command_t handle,
bool  stdin_enable,
bool  network_enable,
uint16_t  port 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ command_network_send()

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

◆ command_new()

command_t* command_new ( void  )
Here is the caller graph for this function:

◆ command_playlist_push_write()

void command_playlist_push_write ( playlist_t playlist,
const char *  path,
const char *  label,
const char *  core_path,
const char *  core_name 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ command_playlist_update_write()

void command_playlist_update_write ( playlist_t plist,
size_t  idx,
const char *  path,
const char *  label,
const char *  core_path,
const char *  core_display_name,
const char *  crc32,
const char *  db_name 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ command_poll()

bool command_poll ( command_t handle)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ command_set()

bool command_set ( command_handle_t handle)

◆ command_set_shader()

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

◆ event_init_content()

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

Variable Documentation

◆ discord_is_inited

bool discord_is_inited