From 33965bc29ba5a934a449bef817f38b78db3a7af4 Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Sun, 13 Aug 2023 17:31:29 +0300 Subject: [PATCH] examples/2048: remove the emscripten specific code from examples/2048/2048.v (moved to gg.c.v) --- examples/2048/2048.v | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/examples/2048/2048.v b/examples/2048/2048.v index e4f389e22d05ef..61b818d7875352 100644 --- a/examples/2048/2048.v +++ b/examples/2048/2048.v @@ -909,10 +909,6 @@ fn (mut app App) showfps() { } } -$if emscripten ? { - #flag --embed-file ./examples/assets/fonts/RobotoMono-Regular.ttf@/assets/fonts/RobotoMono-Regular.ttf -} - fn main() { mut app := &App{} app.new_game() @@ -920,13 +916,6 @@ fn main() { $if android { font_path = 'fonts/RobotoMono-Regular.ttf' } - mut window_title_ := 'V 2048' - // TODO: Make emcc a real platform ifdef - $if emscripten ? { - // in emscripten, sokol uses `window_title` as the selector to the canvas it'll render to, - // and since `document.querySelector('V 2048')` isn't valid JS, we use `canvas` instead - window_title_ = 'canvas' - } app.perf = &Perf{} app.gg = gg.new_context( bg_color: app.theme.bg_color @@ -934,7 +923,7 @@ fn main() { height: default_window_height sample_count: 4 // higher quality curves create_window: true - window_title: window_title_ + window_title: 'V 2048' frame_fn: frame event_fn: on_event init_fn: init