File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1576,6 +1576,14 @@ if(PLAYER_ENABLE_BENCHMARKS)
15761576 set_target_properties(bench_${name} PROPERTIES WIN32_EXECUTABLE FALSE)
15771577 target_link_libraries(bench_${name} ${PROJECT_NAME} )
15781578 target_link_libraries(bench_${name} benchmark)
1579+ if(CMAKE_SYSTEM_NAME STREQUAL " Emscripten ")
1580+ target_link_libraries(bench_${name} " websocket.js ")
1581+ set_property(TARGET bench_${name} PROPERTY LINK_FLAGS
1582+ " -sALLOW_MEMORY_GROWTH -sMODULARIZE \
1583+ -sEXIT_RUNTIME --bind \
1584+ -sDEFAULT_LIBRARY_FUNCS_TO_INCLUDE=['$autoResumeAudioContext','$dynCall'] \
1585+ -sEXPORTED_FUNCTIONS=_main,_malloc,_free ")
1586+ endif()
15791587 endforeach()
15801588endif()
15811589
Original file line number Diff line number Diff line change 55
66static void BM_InitRtp2k (benchmark::State& state) {
77 Output::SetLogLevel (LogLevel::Error);
8- Player::engine = Player::EngineRpg2k;
8+ Player::game_config. engine = Player::EngineRpg2k;
99
1010 bool no_rtp_flag = false ;
1111 bool no_rtp_warning_flag = false ;
1212 for (auto _: state) {
1313 FileFinder_RTP (no_rtp_flag, no_rtp_warning_flag, " " );
1414 }
1515
16- Player::engine = Player::EngineNone;
16+ Player::game_config. engine = Player::EngineNone;
1717 Output::SetLogLevel (LogLevel::Debug);
1818}
1919
2020BENCHMARK (BM_InitRtp2k);
2121
2222static void BM_InitRtp2k3 (benchmark::State& state) {
2323 Output::SetLogLevel (LogLevel::Error);
24- Player::engine = Player::EngineRpg2k3;
24+ Player::game_config. engine = Player::EngineRpg2k3;
2525
2626 bool no_rtp_flag = false ;
2727 bool no_rtp_warning_flag = false ;
2828 for (auto _: state) {
2929 FileFinder_RTP (no_rtp_flag, no_rtp_warning_flag, " " );
3030 }
3131
32- Player::engine = Player::EngineNone;
32+ Player::game_config. engine = Player::EngineNone;
3333 Output::SetLogLevel (LogLevel::Debug);
3434}
3535
You can’t perform that action at this time.
0 commit comments