1
0
mirror of https://github.com/libretro/RetroArch synced 2024-07-08 12:15:49 +00:00

Add TODO/FIXME notes

This commit is contained in:
twinaphex 2020-05-29 10:23:48 +02:00
parent 06f5f40cb3
commit ec35ce7fdc
9 changed files with 67 additions and 59 deletions

View File

@ -78,6 +78,7 @@ typedef struct
retro_time_t list_id;
} gfx_thumbnail_tag_t;
/* TODO/FIXME */
/* Global gfx_thumbnail_state structure */
static gfx_thumbnail_state_t gfx_thumb_state;

View File

@ -31,8 +31,8 @@
#include "input_osk.h"
#include "input_driver.h"
/* TODO/FIXME - static public global variables */
static char *osk_grid[45] = {NULL};
static int osk_ptr = 0;
static enum osk_type osk_idx = OSK_LOWERCASE_LATIN;

View File

@ -24,6 +24,7 @@
#include "../configuration.h"
#include "../retroarch.h"
/* TODO/FIXME - static public global variables */
static unsigned old_analog_dpad_mode[MAX_USERS];
static unsigned old_libretro_device[MAX_USERS];

View File

@ -49,6 +49,7 @@
#include "../core.h"
#include "../verbosity.h"
/* TODO/FIXME - public global variables */
cheat_manager_t cheat_manager_state;
unsigned cheat_manager_get_buf_size(void)

View File

@ -62,6 +62,65 @@
#include <emmintrin.h>
#endif
struct state_manager
{
uint8_t *data;
size_t capacity;
/* Reading and writing is done here here. */
uint8_t *head;
/* If head comes close to this, discard a frame. */
uint8_t *tail;
uint8_t *thisblock;
uint8_t *nextblock;
/* This one is rounded up from reset::blocksize. */
size_t blocksize;
/* size_t + (blocksize + 131071) / 131072 *
* (blocksize + u16 + u16) + u16 + u32 + size_t
* (yes, the math is a bit ugly). */
size_t maxcompsize;
unsigned entries;
bool thisblock_valid;
#if STRICT_BUF_SIZE
size_t debugsize;
uint8_t *debugblock;
#endif
};
struct state_manager_rewind_state
{
/* Rewind support. */
state_manager_t *state;
size_t size;
};
/* 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
/* TODO/FIXME - static public global variables */
static struct state_manager_rewind_state rewind_state;
static bool frame_is_reversed = false;
/* There's no equivalent in libc, you'd think so ...
* std::mismatch exists, but it's not optimized at all. */
static size_t find_change(const uint16_t *a, const uint16_t *b)
@ -159,64 +218,6 @@ static size_t find_same(const uint16_t *a, const uint16_t *b)
return a - a_org;
}
struct state_manager
{
uint8_t *data;
size_t capacity;
/* Reading and writing is done here here. */
uint8_t *head;
/* If head comes close to this, discard a frame. */
uint8_t *tail;
uint8_t *thisblock;
uint8_t *nextblock;
/* This one is rounded up from reset::blocksize. */
size_t blocksize;
/* size_t + (blocksize + 131071) / 131072 *
* (blocksize + u16 + u16) + u16 + u32 + size_t
* (yes, the math is a bit ugly). */
size_t maxcompsize;
unsigned entries;
bool thisblock_valid;
#if STRICT_BUF_SIZE
size_t debugsize;
uint8_t *debugblock;
#endif
};
/* 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
struct state_manager_rewind_state
{
/* Rewind support. */
state_manager_t *state;
size_t size;
};
static struct state_manager_rewind_state rewind_state;
static bool frame_is_reversed = false;
/* Returns the maximum compressed size of a savestate.
* It is very likely to compress to far less. */
static size_t state_manager_raw_maxsize(size_t uncomp)

View File

@ -45,6 +45,7 @@ struct menu_dialog
typedef struct menu_dialog menu_dialog_t;
/* TODO/FIXME - static public global variables */
static menu_dialog_t dialog;
static menu_dialog_t *dialog_get_ptr(void)

View File

@ -38,6 +38,7 @@
#include "../../content.h"
#include "../../dynamic.h"
/* TODO/FIXME - static public global variables */
static enum filebrowser_enums filebrowser_types = FILEBROWSER_NONE;
enum filebrowser_enums filebrowser_get_type(void)

View File

@ -66,6 +66,7 @@ struct menu_bind_state
struct menu_bind_axis_state axis_state[MAX_USERS];
};
/* TODO/FIXME - static public global variables */
static struct menu_bind_state menu_input_binds = {0};
static bool input_joypad_button_raw(const input_device_driver_t *drv,

View File

@ -86,6 +86,7 @@ struct discord_state
typedef struct discord_state discord_state_t;
/* TODO/FIXME - static public global variables */
static discord_state_t discord_st;
#define CDN_URL "https://cdn.discordapp.com/avatars"