![]() |
Xemu [doxygen]
hyppo 0a42be3a057156924bc1b626a687bd6e27349c45 @ Sat 19 Mar 02:15:11 CET 2022
|
#include "xemu/emutools.h"#include <string.h>#include <sys/types.h>#include <sys/stat.h>#include <fcntl.h>#include <unistd.h>#include <stdlib.h>#include <sys/time.h>#include <time.h>#include <limits.h>#include <errno.h>#include "build/xemu-48x48.xpm"
Go to the source code of this file.
Macros | |
| #define | __TIMING_METHOD_DESC "SDL_GetPerformanceCounter" |
Functions | |
| int | set_mouse_grab (SDL_bool state, int force_allow) |
| SDL_bool | is_mouse_grab (void) |
| void | save_mouse_grab (void) |
| void | restore_mouse_grab (void) |
| struct tm * | xemu_get_localtime (void) |
| time_t | xemu_get_unixtime (void) |
| unsigned int | xemu_get_microseconds (void) |
| Uint8 | xemu_hour_to_bcd12h (Uint8 hours, int hour_offset) |
| void * | xemu_malloc (size_t size) |
| void * | xemu_realloc (void *p, size_t size) |
| void * | _xemu_malloc_ALIGNED_emulated (size_t size) |
| char * | xemu_strdup (const char *s) |
| void | xemu_restrdup (char **ptr, const char *str) |
| void | xemu_drop_events (void) |
| void | xemu_set_full_screen (int setting) |
| void | xemu_set_screen_mode (int setting) |
| void | xemu_timekeeping_delay (int td_em) |
| const char * | xemu_get_uname_string (void) |
| void | xemu_get_timing_stat_string (char *buf, unsigned int size) |
| int | xemu_init_debug (const char *fn) |
| int | xemu_is_first_time_user (void) |
| void | xemu_pre_init (const char *app_organization, const char *app_name, const char *slogan) |
| int | xemu_init_sdl (void) |
| void | xemu_window_snap_to_optimal_size (int forced) |
| void | xemu_set_viewport (unsigned int x1, unsigned int y1, unsigned int x2, unsigned int y2, unsigned int flags) |
| void | xemu_get_viewport (unsigned int *x1, unsigned int *y1, unsigned int *x2, unsigned int *y2) |
| int | xemu_post_init (const char *window_title, int is_resizable, int texture_x_size, int texture_y_size, int logical_x_size, int logical_y_size, int win_x_size, int win_y_size, Uint32 pixel_format, int n_colours, const Uint8 *colours, Uint32 *store_palette, int render_scale_quality, int locked_texture_update, void(*shutdown_callback)(void)) |
| int | xemu_set_icon_from_xpm (char *xpm[]) |
| void | xemu_timekeeping_start (void) |
| void | xemu_render_dummy_frame (Uint32 colour, int texture_x_size, int texture_y_size) |
| Uint32 * | xemu_start_pixel_buffer_access (int *texture_tail) |
| void | xemu_update_screen (void) |
| int | ARE_YOU_SURE (const char *s, int flags) |
| int | _sdl_emu_secured_modal_box_ (const char *items_in, const char *msg) |
| void | sysconsole_open (void) |
| void | sysconsole_close (const char *waitmsg) |
| int | sysconsole_toggle (int set) |
| int | xemu_os_file_exists (const char *fn) |
| int | xemu_os_readdir (XDIR *dirp, char *fn) |
| void | sha1_checksum_as_words (Uint32 hash[5], const Uint8 *data, Uint32 size) |
| void | sha1_checksum_as_bytes (sha1_hash_bytes hash_bytes, const Uint8 *data, Uint32 size) |
| void | sha1_checksum_as_string (sha1_hash_str hash_str, const Uint8 *data, Uint32 size) |
Variables | |
| const char | EMPTY_STR [] = "" |
| const int | ZERO_INT = 0 |
| const int | ONE_INT = 1 |
| int(* | SDL_ShowSimpleMessageBox_custom )(Uint32, const char *, const char *, SDL_Window *) = SDL_ShowSimpleMessageBox |
| int(* | SDL_ShowMessageBox_custom )(const SDL_MessageBoxData *, int *) = SDL_ShowMessageBox |
| int | i_am_sure_override = 0 |
| const char * | str_are_you_sure_to_exit = "Are you sure to exit Xemu?" |
| SDL_Window * | sdl_win = NULL |
| SDL_Renderer * | sdl_ren = NULL |
| SDL_Texture * | sdl_tex = NULL |
| SDL_PixelFormat * | sdl_pix_fmt |
| int | sdl_on_x11 = 0 |
| int | sdl_on_wayland = 0 |
| int | register_new_texture_creation = 0 |
| char * | xemu_app_org = NULL |
| char * | xemu_app_name = NULL |
| char * | sdl_window_title = (char*)default_window_title |
| char * | window_title_custom_addon = NULL |
| char * | window_title_info_addon = NULL |
| Uint32 * | sdl_pixel_buffer = NULL |
| Uint32 * | xemu_frame_pixel_access_p = NULL |
| int | texture_x_size_in_bytes |
| int | emu_is_fullscreen = 0 |
| char * | sdl_pref_dir = NULL |
| char * | sdl_base_dir = NULL |
| char * | sdl_inst_dir = NULL |
| Uint32 | sdl_winid |
| int | seconds_timer_trigger |
| SDL_version | sdlver_compiled |
| SDL_version | sdlver_linked |
| int | sysconsole_is_open = 0 |
| FILE * | debug_fp = NULL |
| int | chatty_xemu = 1 |
| int | sdl_default_win_x_size |
| int | sdl_default_win_y_size |
| int | allow_mouse_grab = 1 |
| #define __TIMING_METHOD_DESC "SDL_GetPerformanceCounter" |
| int _sdl_emu_secured_modal_box_ | ( | const char * | items_in, |
| const char * | msg | ||
| ) |
| void* _xemu_malloc_ALIGNED_emulated | ( | size_t | size | ) |
| int ARE_YOU_SURE | ( | const char * | s, |
| int | flags | ||
| ) |
| SDL_bool is_mouse_grab | ( | void | ) |
| void restore_mouse_grab | ( | void | ) |
| void save_mouse_grab | ( | void | ) |
Definition at line 151 of file emutools.c.
| int set_mouse_grab | ( | SDL_bool | state, |
| int | force_allow | ||
| ) |
| void sha1_checksum_as_bytes | ( | sha1_hash_bytes | hash_bytes, |
| const Uint8 * | data, | ||
| Uint32 | size | ||
| ) |
| void sha1_checksum_as_string | ( | sha1_hash_str | hash_str, |
| const Uint8 * | data, | ||
| Uint32 | size | ||
| ) |
| void sysconsole_close | ( | const char * | waitmsg | ) |
| void sysconsole_open | ( | void | ) |
| int sysconsole_toggle | ( | int | set | ) |
| void xemu_drop_events | ( | void | ) |
Definition at line 294 of file emutools.c.
| struct tm* xemu_get_localtime | ( | void | ) |
Definition at line 187 of file emutools.c.
| unsigned int xemu_get_microseconds | ( | void | ) |
Definition at line 205 of file emutools.c.
| void xemu_get_timing_stat_string | ( | char * | buf, |
| unsigned int | size | ||
| ) |
Definition at line 538 of file emutools.c.
| const char* xemu_get_uname_string | ( | void | ) |
Definition at line 468 of file emutools.c.


| time_t xemu_get_unixtime | ( | void | ) |
Definition at line 199 of file emutools.c.
| void xemu_get_viewport | ( | unsigned int * | x1, |
| unsigned int * | y1, | ||
| unsigned int * | x2, | ||
| unsigned int * | y2 | ||
| ) |
Definition at line 877 of file emutools.c.
Definition at line 211 of file emutools.c.
| int xemu_init_debug | ( | const char * | fn | ) |
| int xemu_init_sdl | ( | void | ) |
Definition at line 744 of file emutools.c.
| int xemu_is_first_time_user | ( | void | ) |
Definition at line 623 of file emutools.c.
| void* xemu_malloc | ( | size_t | size | ) |
| int xemu_os_file_exists | ( | const char * | fn | ) |
Definition at line 1725 of file emutools.c.
| int xemu_os_readdir | ( | XDIR * | dirp, |
| char * | fn | ||
| ) |
Definition at line 1733 of file emutools.c.
| int xemu_post_init | ( | const char * | window_title, |
| int | is_resizable, | ||
| int | texture_x_size, | ||
| int | texture_y_size, | ||
| int | logical_x_size, | ||
| int | logical_y_size, | ||
| int | win_x_size, | ||
| int | win_y_size, | ||
| Uint32 | pixel_format, | ||
| int | n_colours, | ||
| const Uint8 * | colours, | ||
| Uint32 * | store_palette, | ||
| int | render_scale_quality, | ||
| int | locked_texture_update, | ||
| void(*)(void) | shutdown_callback | ||
| ) |
| void xemu_pre_init | ( | const char * | app_organization, |
| const char * | app_name, | ||
| const char * | slogan | ||
| ) |
Definition at line 651 of file emutools.c.


| void* xemu_realloc | ( | void * | p, |
| size_t | size | ||
| ) |
| void xemu_render_dummy_frame | ( | Uint32 | colour, |
| int | texture_x_size, | ||
| int | texture_y_size | ||
| ) |
| void xemu_restrdup | ( | char ** | ptr, |
| const char * | str | ||
| ) |
Definition at line 286 of file emutools.c.


| void xemu_set_full_screen | ( | int | setting | ) |
| int xemu_set_icon_from_xpm | ( | char * | xpm[] | ) |
| void xemu_set_screen_mode | ( | int | setting | ) |
Definition at line 343 of file emutools.c.


| void xemu_set_viewport | ( | unsigned int | x1, |
| unsigned int | y1, | ||
| unsigned int | x2, | ||
| unsigned int | y2, | ||
| unsigned int | flags | ||
| ) |
Definition at line 844 of file emutools.c.
| Uint32* xemu_start_pixel_buffer_access | ( | int * | texture_tail | ) |
| char* xemu_strdup | ( | const char * | s | ) |
| void xemu_timekeeping_delay | ( | int | td_em | ) |
Definition at line 405 of file emutools.c.
| void xemu_timekeeping_start | ( | void | ) |
Definition at line 1122 of file emutools.c.
| void xemu_update_screen | ( | void | ) |
| void xemu_window_snap_to_optimal_size | ( | int | forced | ) |
Definition at line 808 of file emutools.c.
| int allow_mouse_grab = 1 |
Definition at line 118 of file emutools.c.
| int chatty_xemu = 1 |
Definition at line 111 of file emutools.c.
| FILE* debug_fp = NULL |
Definition at line 110 of file emutools.c.
| const char EMPTY_STR[] = "" |
Definition at line 57 of file emutools.c.
| int emu_is_fullscreen = 0 |
Definition at line 95 of file emutools.c.
| int i_am_sure_override = 0 |
Definition at line 74 of file emutools.c.
| const int ONE_INT = 1 |
Definition at line 59 of file emutools.c.
| int register_new_texture_creation = 0 |
Definition at line 84 of file emutools.c.
| char * sdl_base_dir = NULL |
Definition at line 97 of file emutools.c.
| int sdl_default_win_x_size |
Definition at line 112 of file emutools.c.
| int sdl_default_win_y_size |
Definition at line 113 of file emutools.c.
| char * sdl_inst_dir = NULL |
Definition at line 97 of file emutools.c.
| int sdl_on_wayland = 0 |
Definition at line 81 of file emutools.c.
| int sdl_on_x11 = 0 |
Definition at line 81 of file emutools.c.
| SDL_PixelFormat* sdl_pix_fmt |
Definition at line 80 of file emutools.c.
| Uint32* sdl_pixel_buffer = NULL |
Definition at line 92 of file emutools.c.
| char* sdl_pref_dir = NULL |
Definition at line 97 of file emutools.c.
| SDL_Renderer* sdl_ren = NULL |
Definition at line 78 of file emutools.c.
| int(* SDL_ShowMessageBox_custom) (const SDL_MessageBoxData *, int *) = SDL_ShowMessageBox |
Definition at line 63 of file emutools.c.
| int(* SDL_ShowSimpleMessageBox_custom) (Uint32, const char *, const char *, SDL_Window *) = SDL_ShowSimpleMessageBox |
Definition at line 62 of file emutools.c.
| SDL_Texture* sdl_tex = NULL |
Definition at line 79 of file emutools.c.
| SDL_Window* sdl_win = NULL |
Definition at line 77 of file emutools.c.
| char* sdl_window_title = (char*)default_window_title |
Definition at line 89 of file emutools.c.
| Uint32 sdl_winid |
Definition at line 98 of file emutools.c.
| SDL_version sdlver_compiled |
Definition at line 102 of file emutools.c.
| SDL_version sdlver_linked |
Definition at line 102 of file emutools.c.
| int seconds_timer_trigger |
Definition at line 101 of file emutools.c.
| const char* str_are_you_sure_to_exit = "Are you sure to exit Xemu?" |
Definition at line 75 of file emutools.c.
| int sysconsole_is_open = 0 |
Definition at line 109 of file emutools.c.
| int texture_x_size_in_bytes |
Definition at line 94 of file emutools.c.
| char* window_title_custom_addon = NULL |
Definition at line 90 of file emutools.c.
| char* window_title_info_addon = NULL |
Definition at line 91 of file emutools.c.
| char * xemu_app_name = NULL |
Definition at line 85 of file emutools.c.
| char* xemu_app_org = NULL |
Definition at line 85 of file emutools.c.
| Uint32* xemu_frame_pixel_access_p = NULL |
Definition at line 93 of file emutools.c.
| const int ZERO_INT = 0 |
Definition at line 58 of file emutools.c.
1.8.17