diff --git a/_mirror b/_mirror index b82b5ab..20989f7 160000 --- a/_mirror +++ b/_mirror @@ -1 +1 @@ -Subproject commit b82b5ab54dae8de6498e566956b6163b3f4c27cd +Subproject commit 20989f73cd14330b84c627cc1742b63732d67bcb diff --git a/engine/joint/v4k.h b/engine/joint/v4k.h index 890f8d2..e06ee6c 100644 --- a/engine/joint/v4k.h +++ b/engine/joint/v4k.h @@ -14153,6 +14153,12 @@ extern "C" { #define ifdef_32 ifdef_true #endif +#ifdef ENABLE_RETAIL +#define ifdef_retail ifdef_true +#else +#define ifdef_retail ifdef_false +#endif + // ----------------------------------------------------------------------------- // new C keywords @@ -335600,6 +335606,7 @@ void cook_cancel() { int cook_jobs() { int num_jobs = optioni("--cook-jobs", maxf(1.15,app_cores()) * 1.75), max_jobs = countof(jobs); ifdef(ems, num_jobs = 0); + ifdef(retail, num_jobs = 0); return clampi(num_jobs, 0, max_jobs); } @@ -355261,9 +355268,9 @@ void window_color(unsigned color) { winbgcolor = vec4(r / 255.0, g / 255.0, b / 255.0, a / 255.0); } void window_icon(const char *file_icon) { - unsigned len = file_size(file_icon); len = len ? len : vfs_size(file_icon); // @fixme: reenable this to allow icons to be put in cooked .zipfiles + unsigned len = file_size(file_icon); len = len ? len : vfs_size(file_icon); if( len ) { - void *data = file_read(file_icon); data = data ? data : vfs_read(file_icon); // @fixme: reenable this to allow icons to be put in cooked .zipfiles + void *data = file_read(file_icon); data = data ? data : vfs_read(file_icon); if( data ) { image_t img = image_from_mem(data, len, IMAGE_RGBA); if( img.w && img.h && img.pixels ) { @@ -356982,12 +356989,10 @@ void v4k_init() { __argc = 0; } -#if !ENABLE_RETAIL // create or update cook.zip file if( /* !COOK_ON_DEMAND && */ file_exist(COOK_INI) && cook_jobs() ) { cook_start(COOK_INI, "**", 0|COOK_ASYNC|COOK_CANCELABLE ); } -#endif atexit(v4k_quit); } diff --git a/engine/split/v4k_config.h b/engine/split/v4k_config.h index a897ce9..51a2e43 100644 --- a/engine/split/v4k_config.h +++ b/engine/split/v4k_config.h @@ -122,6 +122,12 @@ #define ifdef_32 ifdef_true #endif +#ifdef ENABLE_RETAIL +#define ifdef_retail ifdef_true +#else +#define ifdef_retail ifdef_false +#endif + // ----------------------------------------------------------------------------- // new C keywords diff --git a/engine/split/v4k_cooker.c b/engine/split/v4k_cooker.c index a924228..4b1ecf5 100644 --- a/engine/split/v4k_cooker.c +++ b/engine/split/v4k_cooker.c @@ -799,6 +799,7 @@ void cook_cancel() { int cook_jobs() { int num_jobs = optioni("--cook-jobs", maxf(1.15,app_cores()) * 1.75), max_jobs = countof(jobs); ifdef(ems, num_jobs = 0); + ifdef(retail, num_jobs = 0); return clampi(num_jobs, 0, max_jobs); } diff --git a/engine/split/v4k_main.c b/engine/split/v4k_main.c index 51e2d3e..4a3defc 100644 --- a/engine/split/v4k_main.c +++ b/engine/split/v4k_main.c @@ -90,12 +90,10 @@ void v4k_init() { __argc = 0; } -#if !ENABLE_RETAIL // create or update cook.zip file if( /* !COOK_ON_DEMAND && */ file_exist(COOK_INI) && cook_jobs() ) { cook_start(COOK_INI, "**", 0|COOK_ASYNC|COOK_CANCELABLE ); } -#endif atexit(v4k_quit); } diff --git a/engine/split/v4k_window.c b/engine/split/v4k_window.c index 4072d4e..6c04cb9 100644 --- a/engine/split/v4k_window.c +++ b/engine/split/v4k_window.c @@ -991,9 +991,9 @@ void window_color(unsigned color) { winbgcolor = vec4(r / 255.0, g / 255.0, b / 255.0, a / 255.0); } void window_icon(const char *file_icon) { - unsigned len = file_size(file_icon); len = len ? len : vfs_size(file_icon); // @fixme: reenable this to allow icons to be put in cooked .zipfiles + unsigned len = file_size(file_icon); len = len ? len : vfs_size(file_icon); if( len ) { - void *data = file_read(file_icon); data = data ? data : vfs_read(file_icon); // @fixme: reenable this to allow icons to be put in cooked .zipfiles + void *data = file_read(file_icon); data = data ? data : vfs_read(file_icon); if( data ) { image_t img = image_from_mem(data, len, IMAGE_RGBA); if( img.w && img.h && img.pixels ) { diff --git a/engine/v4k.c b/engine/v4k.c index cf81c7d..316a0e2 100644 --- a/engine/v4k.c +++ b/engine/v4k.c @@ -4631,6 +4631,7 @@ void cook_cancel() { int cook_jobs() { int num_jobs = optioni("--cook-jobs", maxf(1.15,app_cores()) * 1.75), max_jobs = countof(jobs); ifdef(ems, num_jobs = 0); + ifdef(retail, num_jobs = 0); return clampi(num_jobs, 0, max_jobs); } @@ -24292,9 +24293,9 @@ void window_color(unsigned color) { winbgcolor = vec4(r / 255.0, g / 255.0, b / 255.0, a / 255.0); } void window_icon(const char *file_icon) { - unsigned len = file_size(file_icon); len = len ? len : vfs_size(file_icon); // @fixme: reenable this to allow icons to be put in cooked .zipfiles + unsigned len = file_size(file_icon); len = len ? len : vfs_size(file_icon); if( len ) { - void *data = file_read(file_icon); data = data ? data : vfs_read(file_icon); // @fixme: reenable this to allow icons to be put in cooked .zipfiles + void *data = file_read(file_icon); data = data ? data : vfs_read(file_icon); if( data ) { image_t img = image_from_mem(data, len, IMAGE_RGBA); if( img.w && img.h && img.pixels ) { @@ -26013,12 +26014,10 @@ void v4k_init() { __argc = 0; } -#if !ENABLE_RETAIL // create or update cook.zip file if( /* !COOK_ON_DEMAND && */ file_exist(COOK_INI) && cook_jobs() ) { cook_start(COOK_INI, "**", 0|COOK_ASYNC|COOK_CANCELABLE ); } -#endif atexit(v4k_quit); } diff --git a/engine/v4k.h b/engine/v4k.h index 9c63653..a310d7c 100644 --- a/engine/v4k.h +++ b/engine/v4k.h @@ -220,6 +220,12 @@ extern "C" { #define ifdef_32 ifdef_true #endif +#ifdef ENABLE_RETAIL +#define ifdef_retail ifdef_true +#else +#define ifdef_retail ifdef_false +#endif + // ----------------------------------------------------------------------------- // new C keywords