Skip to content

Commit

Permalink
Extra fixes for upstream merge
Browse files Browse the repository at this point in the history
  • Loading branch information
patapancakes committed Jan 8, 2024
1 parent 4812596 commit 552f131
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1148,7 +1148,8 @@ if(${PLAYER_BUILD_EXECUTABLE} AND ${PLAYER_TARGET_PLATFORM} MATCHES "^SDL(1|2)$"
"-sALLOW_MEMORY_GROWTH -sMINIFY_HTML=0 -sMODULARIZE -sEXPORT_NAME=createEasyRpgPlayer \
-sEXIT_RUNTIME --bind --pre-js ${PLAYER_JS_PREJS} --post-js ${PLAYER_JS_POSTJS} \
-sDEFAULT_LIBRARY_FUNCS_TO_INCLUDE=['$autoResumeAudioContext','$dynCall'] \
-sEXPORTED_FUNCTIONS=_main,_malloc,_free")
-sEXPORTED_FUNCTIONS=_main,_malloc,_free,_GetPlayerCoords,_SetGameLanguage,_SessionReady,_ToggleMute,_SetSoundVolume,_SetMusicVolume,_TogglePlayerSounds,_SetNametagMode,_SetSessionToken \
-sGL_ENABLE_GET_PROC_ADDRESS")
set_source_files_properties("src/platform/sdl/main.cpp" PROPERTIES
OBJECT_DEPENDS "${PLAYER_JS_PREJS};${PLAYER_JS_POSTJS};${PLAYER_JS_SHELL}")

Expand All @@ -1166,7 +1167,6 @@ if(${PLAYER_BUILD_EXECUTABLE} AND ${PLAYER_TARGET_PLATFORM} MATCHES "^SDL(1|2)$"

target_link_libraries(${EXE_NAME} "idbfs.js")
target_link_libraries(${EXE_NAME} "websocket.js")
set_property(TARGET ${EXE_NAME} APPEND_STRING PROPERTY LINK_FLAGS " -s EXPORTED_FUNCTIONS='[\"_GetPlayerCoords\",\"_SetGameLanguage\",\"_SessionReady\",\"_ToggleMute\",\"_SetSoundVolume\",\"_SetMusicVolume\",\"_TogglePlayerSounds\",\"_SetNametagMode\",\"_SetSessionToken\"]'")
set_property(TARGET ${EXE_NAME} APPEND_STRING PROPERTY LINK_FLAGS " -s EXPORTED_RUNTIME_METHODS='[\"ccall\",\"cwrap\",\"intArrayFromString\",\"ALLOC_NORMAL\",\"allocate\",\"getValue\"]'")
set_target_properties(${EXE_NAME} PROPERTIES OUTPUT_NAME "${PLAYER_JS_OUTPUT_NAME}")
endif()
Expand Down
2 changes: 1 addition & 1 deletion src/async_handler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ void AsyncHandler::ClearRequests() {
auto it = async_requests.begin();
while (it != async_requests.end()) {
auto& req = *it;
if (it->second.IsReady()) {
if (it->second->IsReady()) {
it = async_requests.erase(it);
} else {
++it;
Expand Down
1 change: 1 addition & 0 deletions src/platform/sdl/sdl2_ui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ Sdl2Ui::Sdl2Ui(long width, long height, const Game_Config& cfg) : BaseUi(cfg)
#endif
#ifdef EMSCRIPTEN
SDL_SetHint(SDL_HINT_EMSCRIPTEN_ASYNCIFY, "0");
SDL_SetHint(SDL_HINT_EMSCRIPTEN_KEYBOARD_ELEMENT, "#canvas");
#endif
#ifdef __WIIU__
//WHBProcInit();
Expand Down

0 comments on commit 552f131

Please sign in to comment.