From: hgn Date: Fri, 14 Jun 2024 19:47:44 +0000 (+0100) Subject: move load guard here X-Git-Url: https://harrygodden.com/git/?a=commitdiff_plain;h=96c0065a6965bc4d93337eca9b235d252680994a;p=vg.git move load guard here --- diff --git a/vg_engine.c b/vg_engine.c index a7e8a68..ed016be 100644 --- a/vg_engine.c +++ b/vg_engine.c @@ -119,6 +119,8 @@ void async_internal_complete( void *payload, u32 size ) } TEMP_STATUS_UNLOCK( &vg.sl_status ); + + vg.client_has_control = 1; } #ifdef VG_CUSTOM_SHADERS @@ -127,6 +129,14 @@ void vg_auto_shader_register(void); /* created from codegen */ static void _vg_load_full( void *data ) { +vg_info(" Copyright . . . -----, ,----- ,---. .---. \n" ); +vg_info(" 2021-2024 |\\ /| | / | | | | /| \n" ); +vg_info(" | \\ / | +-- / +----- +---' | / | \n" ); +vg_info(" | \\ / | | / | | \\ | / | \n" ); +vg_info(" | \\/ | | / | | \\ | / | \n" ); +vg_info(" ' ' '--' [] '----- '----- ' ' '---' " + "SOFTWARE\n" ); + vg_preload(); vg_tex2d_replace_with_error_async( &vg.tex_missing ); vg_async_stall(); diff --git a/vg_engine.h b/vg_engine.h index 936a464..54c595b 100644 --- a/vg_engine.h +++ b/vg_engine.h @@ -123,7 +123,14 @@ struct vg_engine /* Engine sync */ SDL_Window *window; SDL_GLContext gl_context; - SDL_sem *sem_loader; /* allows only one loader at a time */ + SDL_sem *sem_loader; /* allows only one loader at a time */ + + bool client_has_control; /* [T0] If 0: VG will display a loader screen + If 1: The game is responsible for + drawing everything. + This can be set back to 0 after vg_load is + complete to blinder the client + Not recommended! */ SDL_threadID thread_id_main, thread_id_loader;