RetroArch
Classes | Macros | Functions | Variables
state_manager.c File Reference
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <retro_inline.h>
#include <compat/strl.h>
#include <compat/intrinsics.h>
#include "state_manager.h"
#include "../msg_hash.h"
#include "../movie.h"
#include "../core.h"
#include "../verbosity.h"
#include "../audio/audio_driver.h"
Include dependency graph for state_manager.c:

Classes

struct  state_manager
 
struct  state_manager_rewind_state
 

Macros

#define __STDC_LIMIT_MACROS
 
#define STRICT_BUF_SIZE   0
 
#define UINT16_MAX   0xffff
 
#define UINT32_MAX   0xffffffffu
 
#define NO_UNALIGNED_MEM
 

Functions

static size_t find_change (const uint16_t *a, const uint16_t *b)
 
static size_t find_same (const uint16_t *a, const uint16_t *b)
 
static size_t state_manager_raw_maxsize (size_t uncomp)
 
static voidstate_manager_raw_alloc (size_t len, uint16_t uniq)
 
static size_t state_manager_raw_compress (const void *src, const void *dst, size_t len, void *patch)
 
static void state_manager_raw_decompress (const void *patch, size_t patchlen, void *data, size_t datalen)
 
static INLINE void write_size_t (void *ptr, size_t val)
 
static INLINE size_t read_size_t (const void *ptr)
 
static void state_manager_free (state_manager_t *state)
 
static state_manager_tstate_manager_new (size_t state_size, size_t buffer_size)
 
static bool state_manager_pop (state_manager_t *state, const void **data)
 
static void state_manager_push_where (state_manager_t *state, void **data)
 
static void state_manager_push_do (state_manager_t *state)
 
void state_manager_event_init (unsigned rewind_buffer_size)
 
bool state_manager_frame_is_reversed (void)
 
void state_manager_event_deinit (void)
 
bool state_manager_check_rewind (bool pressed, unsigned rewind_granularity, bool is_paused, char *s, size_t len, unsigned *time)
 

Variables

static struct state_manager_rewind_state rewind_state
 
static bool frame_is_reversed = false
 

Macro Definition Documentation

◆ __STDC_LIMIT_MACROS

#define __STDC_LIMIT_MACROS

◆ NO_UNALIGNED_MEM

#define NO_UNALIGNED_MEM

◆ STRICT_BUF_SIZE

#define STRICT_BUF_SIZE   0

◆ UINT16_MAX

#define UINT16_MAX   0xffff

◆ UINT32_MAX

#define UINT32_MAX   0xffffffffu

Function Documentation

◆ find_change()

static size_t find_change ( const uint16_t a,
const uint16_t b 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ find_same()

static size_t find_same ( const uint16_t a,
const uint16_t b 
)
static
Here is the caller graph for this function:

◆ read_size_t()

static INLINE size_t read_size_t ( const void ptr)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ state_manager_check_rewind()

bool state_manager_check_rewind ( bool  pressed,
unsigned  rewind_granularity,
bool  is_paused,
char *  s,
size_t  len,
unsigned *  time 
)

check_rewind: : was rewind key pressed or held?

Checks if rewind toggle/hold was being pressed and/or held.

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

◆ state_manager_event_deinit()

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

◆ state_manager_event_init()

void state_manager_event_init ( unsigned  rewind_buffer_size)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ state_manager_frame_is_reversed()

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

◆ state_manager_free()

static void state_manager_free ( state_manager_t state)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ state_manager_new()

static state_manager_t* state_manager_new ( size_t  state_size,
size_t  buffer_size 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ state_manager_pop()

static bool state_manager_pop ( state_manager_t state,
const void **  data 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ state_manager_push_do()

static void state_manager_push_do ( state_manager_t state)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ state_manager_push_where()

static void state_manager_push_where ( state_manager_t state,
void **  data 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ state_manager_raw_alloc()

static void* state_manager_raw_alloc ( size_t  len,
uint16_t  uniq 
)
static
Here is the caller graph for this function:

◆ state_manager_raw_compress()

static size_t state_manager_raw_compress ( const void src,
const void dst,
size_t  len,
void patch 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ state_manager_raw_decompress()

static void state_manager_raw_decompress ( const void patch,
size_t  patchlen,
void data,
size_t  datalen 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ state_manager_raw_maxsize()

static size_t state_manager_raw_maxsize ( size_t  uncomp)
static
Here is the caller graph for this function:

◆ write_size_t()

static INLINE void write_size_t ( void ptr,
size_t  val 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ frame_is_reversed

bool frame_is_reversed = false
static

◆ rewind_state

struct state_manager_rewind_state rewind_state
static