mirror of
https://github.com/libretro/RetroArch
synced 2025-01-17 01:16:25 +00:00
Style / indent nits
This commit is contained in:
parent
689cd6322f
commit
5b476460d8
@ -134,13 +134,16 @@ typedef struct menu_ctx_driver_backend
|
||||
{
|
||||
int (*iterate)(unsigned);
|
||||
void (*shader_manager_init)(menu_handle_t *);
|
||||
void (*shader_manager_get_str)(struct gfx_shader *, char *, size_t, const char *, const char *, unsigned);
|
||||
void (*shader_manager_set_preset)(struct gfx_shader *, unsigned, const char*);
|
||||
void (*shader_manager_get_str)(struct gfx_shader *, char *,
|
||||
size_t, const char *, const char *, unsigned);
|
||||
void (*shader_manager_set_preset)(struct gfx_shader *,
|
||||
unsigned, const char*);
|
||||
void (*shader_manager_save_preset)(const char *, bool);
|
||||
unsigned (*shader_manager_get_type)(const struct gfx_shader *);
|
||||
int (*shader_manager_setting_toggle)(unsigned, const char *, unsigned);
|
||||
unsigned (*type_is)(const char *, unsigned);
|
||||
void (*setting_set_label)(char *, size_t, unsigned *, unsigned, const char *, const char *, unsigned);
|
||||
void (*setting_set_label)(char *, size_t, unsigned *,
|
||||
unsigned, const char *, const char *, unsigned);
|
||||
const char *ident;
|
||||
} menu_ctx_driver_backend_t;
|
||||
|
||||
|
@ -71,8 +71,11 @@ extern const frontend_ctx_driver_t frontend_ctx_android;
|
||||
extern const frontend_ctx_driver_t frontend_ctx_psp;
|
||||
extern const frontend_ctx_driver_t frontend_ctx_null;
|
||||
|
||||
const frontend_ctx_driver_t *frontend_ctx_find_driver(const char *ident); // Finds driver with ident. Does not initialize.
|
||||
const frontend_ctx_driver_t *frontend_ctx_init_first(void); // Finds first suitable driver and initializes.
|
||||
/* Finds driver with ident. Does not initialize. */
|
||||
const frontend_ctx_driver_t *frontend_ctx_find_driver(const char *ident);
|
||||
|
||||
/* Finds first suitable driver and initialize. */
|
||||
const frontend_ctx_driver_t *frontend_ctx_init_first(void);
|
||||
|
||||
int main_entry_iterate_clear_input(signature(), args_type() args);
|
||||
int main_entry_iterate_load_content(signature(), args_type() args);
|
||||
|
@ -811,7 +811,8 @@ int rarch_main(int argc, char *argv[]);
|
||||
|
||||
bool rarch_replace_config(const char *path);
|
||||
|
||||
void rarch_main_init_wrap(const struct rarch_main_wrap *args, int *argc, char **argv);
|
||||
void rarch_main_init_wrap(const struct rarch_main_wrap *args,
|
||||
int *argc, char **argv);
|
||||
|
||||
int rarch_main_init(int argc, char *argv[]);
|
||||
void rarch_main_set_state(unsigned action);
|
||||
|
@ -23,23 +23,42 @@
|
||||
#ifndef LIBRETRO_PRIVATE_H__
|
||||
#define LIBRETRO_PRIVATE_H__
|
||||
|
||||
// Private additions to libretro. No API/ABI stability guaranteed.
|
||||
/* Private additions to libretro. No API/ABI stability guaranteed. */
|
||||
|
||||
#include "libretro.h"
|
||||
|
||||
#define RETRO_ENVIRONMENT_SET_LIBRETRO_PATH (RETRO_ENVIRONMENT_PRIVATE | 0)
|
||||
// const char * --
|
||||
// Sets the absolute path for the libretro core pointed to. RETRO_ENVIRONMENT_EXEC will use the last libretro core set with this call.
|
||||
// Returns false if file for absolute path could not be found.
|
||||
/* const char * --
|
||||
* Sets the absolute path for the
|
||||
* libretro core pointed to.
|
||||
* RETRO_ENVIRONMENT_EXEC will use
|
||||
* the last libretro core set with this call.
|
||||
* Returns false if file for absolute path
|
||||
* could not be found.
|
||||
*/
|
||||
#define RETRO_ENVIRONMENT_EXEC (RETRO_ENVIRONMENT_PRIVATE | 1)
|
||||
// const char * --
|
||||
// Requests that this core is deinitialized, and a new core is loaded.
|
||||
// The libretro core used is set with SET_LIBRETRO_PATH, and path to game is passed in _EXEC. NULL means no game.
|
||||
/* const char * --
|
||||
* Requests that this core is
|
||||
* deinitialized, and a new core is loaded.
|
||||
* The libretro core used is set with
|
||||
* SET_LIBRETRO_PATH, and path to
|
||||
* game is passed in _EXEC. NULL
|
||||
* means no game. */
|
||||
#define RETRO_ENVIRONMENT_EXEC_ESCAPE (RETRO_ENVIRONMENT_PRIVATE | 2)
|
||||
// const char * --
|
||||
// Requests that this core is deinitialized, and a new core is loaded. It also escapes the main loop the core is currently
|
||||
// bound to.
|
||||
// The libretro core used is set with SET_LIBRETRO_PATH, and path to game is passed in _EXEC. NULL means no game.
|
||||
/* const char * --
|
||||
* Requests that this core is
|
||||
* deinitialized, and a new core
|
||||
* is loaded.
|
||||
*
|
||||
* It also escapes the main loop
|
||||
* the core is currently
|
||||
* bound to.
|
||||
*
|
||||
* The libretro core used is set
|
||||
* with SET_LIBRETRO_PATH, and
|
||||
* path to game is passed in
|
||||
* _EXEC. NULL means no game.
|
||||
*/
|
||||
|
||||
|
||||
#endif
|
||||
|
70
rewind.c
70
rewind.c
@ -33,41 +33,59 @@
|
||||
#define CPU_X86
|
||||
#endif
|
||||
|
||||
// Other arches SIGBUS (usually) on unaligned accesses.
|
||||
/* Other arches SIGBUS (usually) on unaligned accesses. */
|
||||
#ifndef CPU_X86
|
||||
#define NO_UNALIGNED_MEM
|
||||
#endif
|
||||
|
||||
// Format per frame:
|
||||
// size nextstart;
|
||||
// repeat {
|
||||
// uint16 numchanged; // everything is counted in units of uint16
|
||||
// if (numchanged) {
|
||||
// uint16 numunchanged; // skip these before handling numchanged
|
||||
// uint16[numchanged] changeddata;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// uint32 numunchanged;
|
||||
// if (!numunchanged) break;
|
||||
// }
|
||||
// }
|
||||
// size thisstart;
|
||||
//
|
||||
// The start offsets point to 'nextstart' of any given compressed frame.
|
||||
// Each uint16 is stored native endian; anything that claims any other endianness refers to the endianness of this specific item.
|
||||
// The uint32 is stored little endian.
|
||||
// Each size value is stored native endian if alignment is not enforced; if it is, they're little endian.
|
||||
// The start of the buffer contains a size pointing to the end of the buffer; the end points to its start.
|
||||
// Wrapping is handled by returning to the start of the buffer if the compressed data could potentially hit the edge;
|
||||
// if the compressed data could potentially overwrite the tail pointer, the tail retreats until it can no longer collide.
|
||||
// This means that on average, ~2 * maxcompsize is unused at any given moment.
|
||||
/* Format per frame (pseudocode): */
|
||||
#if 0
|
||||
size nextstart;
|
||||
repeat {
|
||||
uint16 numchanged; /* everything is counted in units of uint16 */
|
||||
if (numchanged)
|
||||
{
|
||||
uint16 numunchanged; /* skip these before handling numchanged */
|
||||
uint16[numchanged] changeddata;
|
||||
}
|
||||
else
|
||||
{
|
||||
uint32 numunchanged;
|
||||
if (!numunchanged)
|
||||
break;
|
||||
}
|
||||
}
|
||||
size thisstart;
|
||||
#endif
|
||||
|
||||
// These are called very few constant times per frame, keep it as simple as possible.
|
||||
/* The start offsets point to 'nextstart' of any given compressed frame.
|
||||
* Each uint16 is stored native endian; anything that claims any other
|
||||
* endianness refers to the endianness of this specific item.
|
||||
* The uint32 is stored little endian.
|
||||
*
|
||||
* Each size value is stored native endian if alignment is not enforced;
|
||||
* if it is, they're little endian.
|
||||
*
|
||||
* The start of the buffer contains a size pointing to the end of the
|
||||
* buffer; the end points to its start.
|
||||
*
|
||||
* Wrapping is handled by returning to the start of the buffer if the
|
||||
* compressed data could potentially hit the edge;
|
||||
*
|
||||
* if the compressed data could potentially overwrite the tail pointer,
|
||||
* the tail retreats until it can no longer collide.
|
||||
*
|
||||
* This means that on average, ~2 * maxcompsize is
|
||||
* unused at any given moment. */
|
||||
|
||||
|
||||
/* These are called very few constant times per frame,
|
||||
* keep it as simple as possible. */
|
||||
static inline void write_size_t(void *ptr, size_t val)
|
||||
{
|
||||
memcpy(ptr, &val, sizeof(val));
|
||||
}
|
||||
|
||||
static inline size_t read_size_t(const void *ptr)
|
||||
{
|
||||
size_t ret;
|
||||
|
@ -39,7 +39,7 @@ int SDL_CondWait(SDL_cond *cond, SDL_mutex *lock)
|
||||
|
||||
SDL_mutexV(lock);
|
||||
*sleeping = true;
|
||||
while (*sleeping); // Yeah, we all love busyloops don't we? ._.
|
||||
while (*sleeping); /* Yeah, we all love busyloops don't we? ._. */
|
||||
SDL_mutexP(lock);
|
||||
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user