Skip to content

Commit

Permalink
Work in progress
Browse files Browse the repository at this point in the history
  • Loading branch information
skhaz committed Dec 24, 2024
1 parent af7691d commit 64a2c46
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ build: ## Build
configure: clean ## Configure
conan remote update conancenter --url https://center2.conan.io
conan install . --output-folder=build --build=missing --profile=webassembly --settings compiler.cppstd=20 --settings build_type=Release
cmake -S . -B build -DCMAKE_TOOLCHAIN_FILE=conan_toolchain.cmake -DSDL2_DIR=generators -DCMAKE_BUILD_TYPE=Release -DLOCAL=ON -DSANDBOX=OFF -DENABLE_PROFILING=OFF
cmake -S . -B build -DCMAKE_TOOLCHAIN_FILE=conan_toolchain.cmake -DSDL2_DIR=generators -DCMAKE_BUILD_TYPE=Release -DLOCAL=ON -DSANDBOX=OFF -DENABLE_PROFILING=ON
5 changes: 5 additions & 0 deletions src/socket.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,11 @@ void socket::handle_message(const EmscriptenWebSocketMessageEvent *event) {
return;
}

if (j.value("command", "") == "reload") {
emscripten_run_script_string("window.location.reload()");
return;
}

if (auto event = j.value("event", json::object()); !event.empty()) {
invoke(
event.at("topic").get_ref<const std::string &>(),
Expand Down

0 comments on commit 64a2c46

Please sign in to comment.