diff --git a/libs/sdl2/source/main.cpp b/libs/sdl2/source/main.cpp index 41d6ccfd..65857f99 100644 --- a/libs/sdl2/source/main.cpp +++ b/libs/sdl2/source/main.cpp @@ -52,9 +52,9 @@ int main(int argc, char ** argv) try log::register_thread("main"); #ifdef __EMSCRIPTEN__ - // In web builds, resources are in the root of + // In web builds, resources are stored in // the Emscripten virtual filesystem - app::set_resource_root("/"); + app::set_resource_root("/resources"); #endif auto const factory = app::make_application_factory(); diff --git a/package/CMakeLists.txt b/package/CMakeLists.txt index 2970af0f..cbb1bd1a 100644 --- a/package/CMakeLists.txt +++ b/package/CMakeLists.txt @@ -218,7 +218,7 @@ function(psemek_package_files target) elseif(PSEMEK_PLATFORM_WEB) foreach(_FILE IN LISTS ARGN) target_link_options(${target} PRIVATE - "--preload-file=${CMAKE_CURRENT_LIST_DIR}/${_FILE}@/${_FILE}" + "--preload-file=${CMAKE_CURRENT_LIST_DIR}/${_FILE}@/resources/${_FILE}" ) endforeach() else()