Skip to content

Commit d9f64b1

Browse files
author
Chris Warren-Smith
committed
RAYLIB: programs must run in a separate thread or via the command line
1 parent c5ace4e commit d9f64b1

File tree

2 files changed

+17
-2
lines changed

2 files changed

+17
-2
lines changed

include/module.h

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,15 @@ extern "C" {
2525
*/
2626
int sblib_init(const char *sourceFile);
2727

28+
/**
29+
* @ingroup modstd
30+
*
31+
* Returns whether the module is compatible with IDE builds
32+
*
33+
* @return non-zero on success
34+
*/
35+
int sblib_is_ide_compatible(void);
36+
2837
/**
2938
* @ingroup modstd
3039
*
@@ -116,7 +125,7 @@ int sblib_func_exec(int index, int param_count, slib_par_t *params, var_t *retva
116125
* @param cls_id the variable class identifier
117126
* @param id the variable instance identifier
118127
*/
119-
void sblib_free(int cls_id, int id);
128+
int sblib_free(int cls_id, int id);
120129

121130
/**
122131
* @ingroup modlib

raylib/main.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1938,7 +1938,7 @@ SBLIB_API int sblib_func_exec(int index, int argc, slib_par_t *params, var_t *re
19381938
return result;
19391939
}
19401940

1941-
SBLIB_API void sblib_free(int cls_id, int id) {
1941+
SBLIB_API int sblib_free(int cls_id, int id) {
19421942
if (id != -1) {
19431943
switch (cls_id) {
19441944
case CLS_AUDIOSTREAM:
@@ -2031,6 +2031,7 @@ SBLIB_API void sblib_free(int cls_id, int id) {
20312031
break;
20322032
}
20332033
}
2034+
return 0;
20342035
}
20352036

20362037
SBLIB_API void sblib_close(void) {
@@ -2095,3 +2096,8 @@ SBLIB_API void sblib_close(void) {
20952096
_waveMap.clear();
20962097
}
20972098
}
2099+
2100+
SBLIB_API void sblib_is_ide_compatible(void) {
2101+
// when using the SQL build, programs must be run via a separate thread
2102+
return false;
2103+
}

0 commit comments

Comments
 (0)