Skip to content

Commit 5b92066

Browse files
author
xiaobai
committed
ohos: fix build
1 parent b1046d9 commit 5b92066

3 files changed

Lines changed: 4 additions & 21 deletions

File tree

frontend/drivers/platform_unix.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@
1818
#ifndef _PLATFORM_UNIX_H
1919
#define _PLATFORM_UNIX_H
2020

21-
#include <ace/xcomponent/native_interface_xcomponent.h>
22-
#include <stdbool.h>
2321
#include <stdint.h>
2422

2523
#include <boolean.h>
@@ -32,6 +30,8 @@
3230
#endif
3331

3432
#ifdef __OHOS__
33+
#include <ace/xcomponent/native_interface_xcomponent.h>
34+
#include <stdbool.h>
3535
#include <deviceinfo.h>
3636
#include <rthreads/rthreads.h>
3737
#include "../../input/input_driver.h"

gfx/display_servers/dispserv_ohos.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,6 @@
1919
#include "../video_display_server.h"
2020
#include "../../frontend/drivers/platform_unix.h"
2121

22-
/* FORWARD DECLARATIONS */
23-
int system_property_get(const char *cmd, const char *args, char *value);
24-
2522
static void* ohos_display_server_init(void) { return NULL; }
2623
static void ohos_display_server_destroy(void *data) { }
2724
static bool ohos_display_server_set_window_opacity(void *data, unsigned opacity) { return true; }

runloop.c

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,7 @@
1919
* If not, see <http://www.gnu.org/licenses/>.
2020
*/
2121

22-
#include "ANGLE/GLES2/gl2.h"
23-
#include "ANGLE/GLES3/gl32.h"
2422
#include "input/input_driver.h"
25-
#include <stdbool.h>
2623
#ifdef _WIN32
2724
#ifdef _XBOX
2825
#include <xtl.h>
@@ -4700,7 +4697,7 @@ static void core_init_libretro_cbs(runloop_state_t *runloop_st,
47004697
{
47014698
retro_input_state_t state_cb = core_input_state_poll_return_cb();
47024699

4703-
//runloop_st->current_core.retro_set_video_refresh(video_driver_frame);
4700+
runloop_st->current_core.retro_set_video_refresh(video_driver_frame);
47044701
runloop_st->current_core.retro_set_audio_sample(audio_driver_sample);
47054702
runloop_st->current_core.retro_set_audio_sample_batch(audio_driver_sample_batch);
47064703
runloop_st->current_core.retro_set_input_state(state_cb);
@@ -8024,8 +8021,6 @@ bool core_set_default_callbacks(void *data)
80248021
return true;
80258022
}
80268023

8027-
8028-
80298024
#ifdef HAVE_NETWORKING
80308025
/**
80318026
* core_set_netplay_callbacks:
@@ -8380,17 +8375,8 @@ void core_run(void)
83808375
input_driver_poll();
83818376
else if (late_polling)
83828377
current_core->flags &= ~RETRO_CORE_FLAG_INPUT_POLLED;
8383-
struct timespec start, end;
8384-
long long diff_us;
8385-
clock_gettime(CLOCK_MONOTONIC, &start);
8378+
83868379
current_core->retro_run();
8387-
clock_gettime(CLOCK_MONOTONIC, &end);
8388-
diff_us = (end.tv_sec - start.tv_sec) * 1000000LL +
8389-
(end.tv_nsec - start.tv_nsec) / 1000LL;
8390-
if (diff_us > 5000) { // 超过 5ms 才记录
8391-
double fps = 1000000.0 / diff_us;
8392-
RARCH_LOG("[PERF] FPS: %.2f\n", fps);
8393-
}
83948380

83958381
#ifdef HAVE_GAME_AI
83968382
{

0 commit comments

Comments
 (0)