Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Libretro
libretro-minivmac
Commits
aa37c205
Commit
aa37c205
authored
Jan 26, 2022
by
Vladimir Serbinenko
Browse files
Use libretro pace for frontend
parent
dc73a222
Changes
1
Hide whitespace changes
Inline
Side-by-side
libretro/libretro-core.c
View file @
aa37c205
#include <ctype.h>
#include <sys/types.h>
#include <sys/time.h>
#include <time.h>
#ifdef WIIU
#include <features_cpu.h>
...
...
@@ -89,6 +87,8 @@ int VIRTUAL_WIDTH;
int
retrow
=
640
;
int
retroh
=
480
;
static
int64_t
ticks_count
;
// For the interface
unsigned
minivmac_devices
[
2
];
extern
int
RETROSTATUS
;
...
...
@@ -287,25 +287,8 @@ void parse_cmdline(const char *argv)
}
long
GetTicks
(
void
)
{
// in MSec
#ifndef _ANDROID_
#if defined(WIIU)
return
(
cpu_features_get_time_usec
());
///1000;
#else
struct
timeval
tv
;
gettimeofday
(
&
tv
,
NULL
);
return
(
tv
.
tv_sec
*
1000000
+
tv
.
tv_usec
);
///1000;
#endif
#else
struct
timespec
now
;
clock_gettime
(
CLOCK_MONOTONIC
,
&
now
);
return
(
now
.
tv_sec
*
1000000
+
now
.
tv_nsec
/
1000
);
///1000;
#endif
{
return
ticks_count
;
}
void
save_bkg
(
void
)
...
...
@@ -600,6 +583,8 @@ void retro_run(void)
static
int
mfirst
=
1
;
bool
updated
=
false
;
ticks_count
+=
1000000
/
60
;
if
(
environ_cb
(
RETRO_ENVIRONMENT_GET_VARIABLE_UPDATE
,
&
updated
)
&&
updated
)
update_variables
();
...
...
@@ -645,6 +630,7 @@ bool retro_load_game(const struct retro_game_info *info)
retro_init_time
();
ticks_count
=
0
;
app_init
();
memset
(
SNDBUF
,
0
,
1024
*
2
*
2
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment