mirror of
https://github.com/Drezil/imgui.git
synced 2024-11-26 05:27:01 +00:00
Examples: Emscripten: Tweaks for size. (#2494)
This commit is contained in:
parent
35cbf9c052
commit
1fe6533192
1
examples/.gitignore
vendored
1
examples/.gitignore
vendored
@ -25,6 +25,7 @@ project.xcworkspace
|
|||||||
xcuserdata
|
xcuserdata
|
||||||
|
|
||||||
## Emscripten output
|
## Emscripten output
|
||||||
|
*.o.tmp
|
||||||
*.out.js
|
*.out.js
|
||||||
*.out.wasm
|
*.out.wasm
|
||||||
example_emscripten/example_emscripten.*
|
example_emscripten/example_emscripten.*
|
||||||
|
@ -24,10 +24,12 @@ UNAME_S := $(shell uname -s)
|
|||||||
EMS = -s USE_SDL=2 -s WASM=1
|
EMS = -s USE_SDL=2 -s WASM=1
|
||||||
EMS += -s ALLOW_MEMORY_GROWTH=1 -s BINARYEN_TRAP_MODE=clamp
|
EMS += -s ALLOW_MEMORY_GROWTH=1 -s BINARYEN_TRAP_MODE=clamp
|
||||||
EMS += -s DISABLE_EXCEPTION_CATCHING=1 -s NO_EXIT_RUNTIME=0
|
EMS += -s DISABLE_EXCEPTION_CATCHING=1 -s NO_EXIT_RUNTIME=0
|
||||||
EMS += -s ASSERTIONS=1 -s SAFE_HEAP=1
|
EMS += -s ASSERTIONS=1 -s NO_FILESYSTEM=1
|
||||||
|
#EMS += -s SAFE_HEAP=1 ## Adds overhead
|
||||||
|
|
||||||
CPPFLAGS = -I../ -I../../
|
CPPFLAGS = -I../ -I../../
|
||||||
CPPFLAGS += -g -Wall -Wformat -O3
|
#CPPFLAGS += -g
|
||||||
|
CPPFLAGS += -Wall -Wformat -Os
|
||||||
CPPFLAGS += $(EMS)
|
CPPFLAGS += $(EMS)
|
||||||
LIBS = $(EMS)
|
LIBS = $(EMS)
|
||||||
LDFLAGS = --shell-file shell_minimal.html
|
LDFLAGS = --shell-file shell_minimal.html
|
||||||
|
@ -63,6 +63,10 @@ int main(int, char**)
|
|||||||
ImGuiIO& io = ImGui::GetIO(); (void)io;
|
ImGuiIO& io = ImGui::GetIO(); (void)io;
|
||||||
//io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard; // Enable Keyboard Controls
|
//io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard; // Enable Keyboard Controls
|
||||||
|
|
||||||
|
// For an Emscripten build we are disabling file-system access, so let's not attempt to do a fopen() of the imgui.ini file.
|
||||||
|
// You may manually call LoadIniSettingsFromMemory() to load settings from your own storage.
|
||||||
|
io.IniFilename = NULL;
|
||||||
|
|
||||||
// Setup Dear ImGui style
|
// Setup Dear ImGui style
|
||||||
ImGui::StyleColorsDark();
|
ImGui::StyleColorsDark();
|
||||||
//ImGui::StyleColorsClassic();
|
//ImGui::StyleColorsClassic();
|
||||||
|
Loading…
Reference in New Issue
Block a user