mirror of
https://github.com/AloUltraExt/sm64ex-alo.git
synced 2025-01-22 07:32:15 -05:00
move sys_sleep to platform.c
This commit is contained in:
parent
49f73f17d6
commit
59cb6a6f7e
3 changed files with 9 additions and 5 deletions
|
@ -119,11 +119,6 @@ const SDL_Scancode scancode_rmapping_nonextended[][2] = {
|
|||
|
||||
#define IS_FULLSCREEN() ((SDL_GetWindowFlags(wnd) & SDL_WINDOW_FULLSCREEN_DESKTOP) != 0)
|
||||
|
||||
static inline void sys_sleep(const uint64_t us) {
|
||||
// TODO: not everything has usleep()
|
||||
usleep(us);
|
||||
}
|
||||
|
||||
static void gfx_sdl_set_fullscreen(void) {
|
||||
if (configWindow.reset)
|
||||
configWindow.fullscreen = false;
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
#include <stdarg.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#ifdef TARGET_WII_U
|
||||
#include <whb/sdcard.h>
|
||||
|
@ -16,6 +17,7 @@
|
|||
|
||||
#include "fs/fs.h"
|
||||
#include "configfile.h"
|
||||
#include "platform.h"
|
||||
|
||||
/* NULL terminated list of platform specific read-only data paths */
|
||||
/* priority is top first */
|
||||
|
@ -74,6 +76,11 @@ const char *sys_file_name(const char *fpath) {
|
|||
return sep + 1;
|
||||
}
|
||||
|
||||
void sys_sleep(const uint64_t us) {
|
||||
// TODO: figure out which of the platforms we want to support DOESN'T have usleep()
|
||||
usleep(us);
|
||||
}
|
||||
|
||||
/* this calls a platform-specific impl function after forming the error message */
|
||||
|
||||
static void sys_fatal_impl(const char *msg) __attribute__ ((noreturn));
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
#define _SM64_PLATFORM_H_
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
|
@ -16,6 +17,7 @@ extern const char *sys_ropaths[];
|
|||
char *sys_strdup(const char *src);
|
||||
char *sys_strlwr(char *src);
|
||||
int sys_strcasecmp(const char *s1, const char *s2);
|
||||
void sys_sleep(const uint64_t us);
|
||||
|
||||
// path stuff
|
||||
const char *sys_user_path(void);
|
||||
|
|
Loading…
Reference in a new issue