messages not working.........

This commit is contained in:
Allen Webster 2020-02-19 22:03:48 -08:00
parent 79438ffd22
commit 87ce4dabdb
1 changed files with 7 additions and 3 deletions

View File

@ -1662,7 +1662,8 @@ main(int argc, char **argv){
Custom_API custom = {};
{
char custom_not_found_msg[] = "Did not find a library for the custom layer.";
char custom_fail_version_msg[] = "Failed to load custom code due to missing version information or a version mismatch. Try rebuilding with buildsuper.";
char custom_fail_load_msg[] = "Failed to load custom code due to missing version information. Try rebuilding with buildsuper.";
char custom_fail_version_msg[] = "Failed to load custom code due to a version mismatch. Try rebuilding with buildsuper.";
char custom_fail_init_apis[] = "Failed to load custom code due to missing 'init_apis' symbol. Try rebuilding with buildsuper";
Scratch_Block scratch(&linuxvars.tctx, Scratch_Share);
@ -1701,7 +1702,10 @@ main(int argc, char **argv){
}
custom.get_version = (_Get_Version_Type*)system_get_proc(custom_library, "get_version");
fprintf(stderr, "VER: %d.%d.%d\n", MAJOR, MINOR, PATCH);
if (custom.get_version == 0 || custom.get_version(MAJOR, MINOR, PATCH) == 0){
if (custom.get_version == 0){
system_error_box(custom_fail_load_msg);
}
else if (custom.get_version(MAJOR, MINOR, PATCH) == 0){
system_error_box(custom_fail_version_msg);
}
custom.init_apis = (_Init_APIs_Type*)system_get_proc(custom_library, "init_apis");