projects
/
carveJwlIkooP6JGAAIwe30JlM.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
70af79f
)
image fail box
author
hgn
<hgodden00@gmail.com>
Sat, 10 Jun 2023 16:33:44 +0000
(17:33 +0100)
committer
hgn
<hgodden00@gmail.com>
Sat, 10 Jun 2023 16:33:44 +0000
(17:33 +0100)
workshop.c
patch
|
blob
|
history
workshop.h
patch
|
blob
|
history
diff --git
a/workshop.c
b/workshop.c
index 55b32d074164674c841c64bbd452aaf4cc989a86..8c24e03b308de083eabef432d6ae4f22cb3c1c35 100644
(file)
--- a/
workshop.c
+++ b/
workshop.c
@@
-575,6
+575,12
@@
VG_STATIC void workshop_form_async_imageload( void *data, u32 len )
stbi_image_free( data );
vg_success( "Loaded workshop preview image\n" );
}
stbi_image_free( data );
vg_success( "Loaded workshop preview image\n" );
}
+ else{
+ snprintf( workshop_form.error_msg, sizeof(workshop_form.error_msg),
+ "Preview image could not be loaded. Reason: %s\n",
+ stbi_failure_reason() );
+ ui_start_modal( workshop_form.error_msg, UI_MODAL_BAD );
+ }
skaterift_end_op();
}
skaterift_end_op();
}
@@
-608,8
+614,6
@@
VG_STATIC void _workshop_load_preview_thread( void *data )
}
}
else{
}
}
else{
- vg_error( "Failed to load workshop_preview.jpg: '%s'\n",
- stbi_failure_reason() );
vg_async_call( workshop_form_async_imageload, NULL, 0 );
}
}
vg_async_call( workshop_form_async_imageload, NULL, 0 );
}
}
diff --git
a/workshop.h
b/workshop.h
index f328d179316444e80e5b3dfaa84672bb54a23ecc..7751df0a1b23d241f5dd34a99838de22b2946101 100644
(file)
--- a/
workshop.h
+++ b/
workshop.h
@@
-105,6
+105,7
@@
struct workshop_form{
*/
const char *failure_or_success_string;
*/
const char *failure_or_success_string;
+ char error_msg[256];
int img_w, img_h;
u8 *img_buffer;
int img_w, img_h;
u8 *img_buffer;