mirror of https://github.com/bjornbytes/lovr.git
Change inclusive module defines to exclusive;
This reduces the number of flags needed to get a regular build.
This commit is contained in:
parent
909c9f94e9
commit
d2ff6c29ac
|
@ -337,17 +337,17 @@ target_link_libraries(lovr
|
||||||
)
|
)
|
||||||
|
|
||||||
if(LOVR_ENABLE_AUDIO)
|
if(LOVR_ENABLE_AUDIO)
|
||||||
target_compile_definitions(lovr PRIVATE LOVR_ENABLE_AUDIO)
|
|
||||||
target_sources(lovr PRIVATE
|
target_sources(lovr PRIVATE
|
||||||
src/modules/audio/audio.c
|
src/modules/audio/audio.c
|
||||||
src/api/l_audio.c
|
src/api/l_audio.c
|
||||||
src/api/l_audio_source.c
|
src/api/l_audio_source.c
|
||||||
src/api/l_audio_microphone.c
|
src/api/l_audio_microphone.c
|
||||||
)
|
)
|
||||||
|
else()
|
||||||
|
target_compile_definitions(lovr PRIVATE LOVR_DISABLE_AUDIO)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(LOVR_ENABLE_DATA)
|
if(LOVR_ENABLE_DATA)
|
||||||
target_compile_definitions(lovr PRIVATE LOVR_ENABLE_DATA)
|
|
||||||
target_sources(lovr PRIVATE
|
target_sources(lovr PRIVATE
|
||||||
src/modules/data/audioStream.c
|
src/modules/data/audioStream.c
|
||||||
src/modules/data/blob.c
|
src/modules/data/blob.c
|
||||||
|
@ -369,27 +369,30 @@ if(LOVR_ENABLE_DATA)
|
||||||
src/lib/stb/stb_vorbis.c
|
src/lib/stb/stb_vorbis.c
|
||||||
src/lib/jsmn/jsmn.c
|
src/lib/jsmn/jsmn.c
|
||||||
)
|
)
|
||||||
|
else()
|
||||||
|
target_compile_definitions(lovr PRIVATE LOVR_DISABLE_DATA)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(LOVR_ENABLE_EVENT)
|
if(LOVR_ENABLE_EVENT)
|
||||||
target_compile_definitions(lovr PRIVATE LOVR_ENABLE_EVENT)
|
|
||||||
target_sources(lovr PRIVATE
|
target_sources(lovr PRIVATE
|
||||||
src/modules/event/event.c
|
src/modules/event/event.c
|
||||||
src/api/l_event.c
|
src/api/l_event.c
|
||||||
)
|
)
|
||||||
|
else()
|
||||||
|
target_compile_definitions(lovr PRIVATE LOVR_DISABLE_EVENT)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(LOVR_ENABLE_FILESYSTEM)
|
if(LOVR_ENABLE_FILESYSTEM)
|
||||||
target_compile_definitions(lovr PRIVATE LOVR_ENABLE_FILESYSTEM)
|
|
||||||
target_sources(lovr PRIVATE
|
target_sources(lovr PRIVATE
|
||||||
src/modules/filesystem/filesystem.c
|
src/modules/filesystem/filesystem.c
|
||||||
src/modules/filesystem/file.c
|
src/modules/filesystem/file.c
|
||||||
src/api/l_filesystem.c
|
src/api/l_filesystem.c
|
||||||
)
|
)
|
||||||
|
else()
|
||||||
|
target_compile_definitions(lovr PRIVATE LOVR_DISABLE_FILESYSTEM)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(LOVR_ENABLE_GRAPHICS)
|
if(LOVR_ENABLE_GRAPHICS)
|
||||||
target_compile_definitions(lovr PRIVATE LOVR_ENABLE_GRAPHICS)
|
|
||||||
target_sources(lovr PRIVATE
|
target_sources(lovr PRIVATE
|
||||||
src/modules/graphics/font.c
|
src/modules/graphics/font.c
|
||||||
src/modules/graphics/graphics.c
|
src/modules/graphics/graphics.c
|
||||||
|
@ -409,9 +412,10 @@ if(LOVR_ENABLE_GRAPHICS)
|
||||||
src/lib/glad/glad.c
|
src/lib/glad/glad.c
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
target_compile_definitions(lovr PRIVATE LOVR_DISABLE_GRAPHICS)
|
||||||
|
endif()
|
||||||
|
|
||||||
if(LOVR_ENABLE_HEADSET)
|
if(LOVR_ENABLE_HEADSET)
|
||||||
target_compile_definitions(lovr PRIVATE LOVR_ENABLE_HEADSET)
|
|
||||||
target_sources(lovr PRIVATE
|
target_sources(lovr PRIVATE
|
||||||
src/api/l_headset.c
|
src/api/l_headset.c
|
||||||
src/modules/headset/headset.c
|
src/modules/headset/headset.c
|
||||||
|
@ -445,10 +449,11 @@ if(LOVR_ENABLE_HEADSET)
|
||||||
target_compile_definitions(lovr PRIVATE LOVR_USE_DESKTOP_HEADSET)
|
target_compile_definitions(lovr PRIVATE LOVR_USE_DESKTOP_HEADSET)
|
||||||
target_sources(lovr PRIVATE src/modules/headset/headset_desktop.c)
|
target_sources(lovr PRIVATE src/modules/headset/headset_desktop.c)
|
||||||
endif()
|
endif()
|
||||||
|
else()
|
||||||
|
target_compile_definitions(lovr PRIVATE LOVR_DISABLE_HEADSET)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(LOVR_ENABLE_MATH)
|
if(LOVR_ENABLE_MATH)
|
||||||
target_compile_definitions(lovr PRIVATE LOVR_ENABLE_MATH)
|
|
||||||
target_sources(lovr PRIVATE
|
target_sources(lovr PRIVATE
|
||||||
src/modules/math/math.c
|
src/modules/math/math.c
|
||||||
src/modules/math/curve.c
|
src/modules/math/curve.c
|
||||||
|
@ -460,10 +465,11 @@ if(LOVR_ENABLE_MATH)
|
||||||
src/api/l_math_vectors.c
|
src/api/l_math_vectors.c
|
||||||
src/lib/noise1234/noise1234.c
|
src/lib/noise1234/noise1234.c
|
||||||
)
|
)
|
||||||
|
else()
|
||||||
|
target_compile_definitions(lovr PRIVATE LOVR_DISABLE_MATH)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(LOVR_ENABLE_PHYSICS)
|
if(LOVR_ENABLE_PHYSICS)
|
||||||
target_compile_definitions(lovr PRIVATE LOVR_ENABLE_PHYSICS)
|
|
||||||
target_sources(lovr PRIVATE
|
target_sources(lovr PRIVATE
|
||||||
src/modules/physics/physics.c
|
src/modules/physics/physics.c
|
||||||
src/api/l_physics.c
|
src/api/l_physics.c
|
||||||
|
@ -472,10 +478,11 @@ if(LOVR_ENABLE_PHYSICS)
|
||||||
src/api/l_physics_shapes.c
|
src/api/l_physics_shapes.c
|
||||||
src/api/l_physics_world.c
|
src/api/l_physics_world.c
|
||||||
)
|
)
|
||||||
|
else()
|
||||||
|
target_compile_definitions(lovr PRIVATE LOVR_DISABLE_PHYSICS)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(LOVR_ENABLE_THREAD)
|
if(LOVR_ENABLE_THREAD)
|
||||||
target_compile_definitions(lovr PRIVATE LOVR_ENABLE_THREAD)
|
|
||||||
target_sources(lovr PRIVATE
|
target_sources(lovr PRIVATE
|
||||||
src/modules/thread/channel.c
|
src/modules/thread/channel.c
|
||||||
src/modules/thread/thread.c
|
src/modules/thread/thread.c
|
||||||
|
@ -484,11 +491,14 @@ if(LOVR_ENABLE_THREAD)
|
||||||
src/api/l_thread_thread.c
|
src/api/l_thread_thread.c
|
||||||
src/lib/tinycthread/tinycthread.c
|
src/lib/tinycthread/tinycthread.c
|
||||||
)
|
)
|
||||||
|
else()
|
||||||
|
target_compile_definitions(lovr PRIVATE LOVR_DISABLE_THREAD)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(LOVR_ENABLE_TIMER)
|
if(LOVR_ENABLE_TIMER)
|
||||||
target_compile_definitions(lovr PRIVATE LOVR_ENABLE_TIMER)
|
|
||||||
target_sources(lovr PRIVATE src/modules/timer/timer.c src/api/l_timer.c)
|
target_sources(lovr PRIVATE src/modules/timer/timer.c src/api/l_timer.c)
|
||||||
|
else()
|
||||||
|
target_compile_definitions(lovr PRIVATE LOVR_DISABLE_TIMER)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Resources
|
# Resources
|
||||||
|
|
24
Tuprules.tup
24
Tuprules.tup
|
@ -59,16 +59,16 @@ EXTRAS_web = bin/lovr.js bin/lovr.wasm
|
||||||
EXTRAS_@(THREAD)_web += bin/lovr.worker.js
|
EXTRAS_@(THREAD)_web += bin/lovr.worker.js
|
||||||
|
|
||||||
## Modules
|
## Modules
|
||||||
CFLAGS_@(AUDIO) += -DLOVR_ENABLE_AUDIO
|
DISABLE_@(AUDIO) += -DLOVR_DISABLE_AUDIO
|
||||||
CFLAGS_@(DATA) += -DLOVR_ENABLE_DATA
|
DISABLE_@(DATA) += -DLOVR_DISABLE_DATA
|
||||||
CFLAGS_@(EVENT) += -DLOVR_ENABLE_EVENT
|
DISABLE_@(EVENT) += -DLOVR_DISABLE_EVENT
|
||||||
CFLAGS_@(FILESYSTEM) += -DLOVR_ENABLE_FILESYSTEM
|
DISABLE_@(FILESYSTEM) += -DLOVR_DISABLE_FILESYSTEM
|
||||||
CFLAGS_@(GRAPHICS) += -DLOVR_ENABLE_GRAPHICS
|
DISABLE_@(GRAPHICS) += -DLOVR_DISABLE_GRAPHICS
|
||||||
CFLAGS_@(HEADSET) += -DLOVR_ENABLE_HEADSET
|
DISABLE_@(HEADSET) += -DLOVR_DISABLE_HEADSET
|
||||||
CFLAGS_@(MATH) += -DLOVR_ENABLE_MATH
|
DISABLE_@(MATH) += -DLOVR_DISABLE_MATH
|
||||||
CFLAGS_@(PHYSICS) += -DLOVR_ENABLE_PHYSICS
|
DISABLE_@(PHYSICS) += -DLOVR_DISABLE_PHYSICS
|
||||||
CFLAGS_@(THREAD) += -DLOVR_ENABLE_THREAD
|
DISABLE_@(THREAD) += -DLOVR_DISABLE_THREAD
|
||||||
CFLAGS_@(TIMER) += -DLOVR_ENABLE_TIMER
|
DISABLE_@(TIMER) += -DLOVR_DISABLE_TIMER
|
||||||
|
|
||||||
## Headset backends
|
## Headset backends
|
||||||
CFLAGS_@(SIMULATOR) += -DLOVR_USE_DESKTOP_HEADSET
|
CFLAGS_@(SIMULATOR) += -DLOVR_USE_DESKTOP_HEADSET
|
||||||
|
@ -271,13 +271,13 @@ LIBS += $(LIBS_y_web)
|
||||||
SUFFIX = .html
|
SUFFIX = .html
|
||||||
endif
|
endif
|
||||||
|
|
||||||
CFLAGS += $(FLAGS) $(FLAGS_y)
|
CFLAGS += $(FLAGS) $(FLAGS_y) $(DISABLE_n) $(CFLAGS_y)
|
||||||
LDFLAGS += $(FLAGS) $(FLAGS_y)
|
LDFLAGS += $(FLAGS) $(FLAGS_y)
|
||||||
CFLAGS += @(EXTRA_CFLAGS)
|
CFLAGS += @(EXTRA_CFLAGS)
|
||||||
LDFLAGS += @(EXTRA_LDFLAGS)
|
LDFLAGS += @(EXTRA_LDFLAGS)
|
||||||
|
|
||||||
## Macros
|
## Macros
|
||||||
!cc = |> ^o CC %b^ $(CC) $(CFLAGS_y) $(CFLAGS) -o %o -c %f |>
|
!cc = |> ^o CC %b^ $(CC) $(CFLAGS) -o %o -c %f |>
|
||||||
!ld = |> ^ LD %o^ $(CC) -o %o %f $(LDFLAGS_y) $(LDFLAGS) |>
|
!ld = |> ^ LD %o^ $(CC) -o %o %f $(LDFLAGS_y) $(LDFLAGS) |>
|
||||||
!xd = |> ^ XD %f^ xxd -i %f > %o |>
|
!xd = |> ^ XD %f^ xxd -i %f > %o |>
|
||||||
!cp = |> ^ CP %b^ cp %f %o |>
|
!cp = |> ^ CP %b^ cp %f %o |>
|
||||||
|
|
|
@ -156,22 +156,22 @@ void luax_readcolor(lua_State* L, int index, struct Color* color);
|
||||||
|
|
||||||
// Module helpers
|
// Module helpers
|
||||||
|
|
||||||
#ifdef LOVR_ENABLE_DATA
|
#ifndef LOVR_DISABLE_DATA
|
||||||
struct Blob;
|
struct Blob;
|
||||||
struct Blob* luax_readblob(lua_State* L, int index, const char* debug);
|
struct Blob* luax_readblob(lua_State* L, int index, const char* debug);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef LOVR_ENABLE_EVENT
|
#ifndef LOVR_DISABLE_EVENT
|
||||||
struct Variant;
|
struct Variant;
|
||||||
void luax_checkvariant(lua_State* L, int index, struct Variant* variant);
|
void luax_checkvariant(lua_State* L, int index, struct Variant* variant);
|
||||||
int luax_pushvariant(lua_State* L, struct Variant* variant);
|
int luax_pushvariant(lua_State* L, struct Variant* variant);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef LOVR_ENABLE_FILESYSTEM
|
#ifndef LOVR_DISABLE_FILESYSTEM
|
||||||
void* luax_readfile(const char* filename, size_t* bytesRead);
|
void* luax_readfile(const char* filename, size_t* bytesRead);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef LOVR_ENABLE_GRAPHICS
|
#ifndef LOVR_DISABLE_GRAPHICS
|
||||||
struct Attachment;
|
struct Attachment;
|
||||||
struct Texture;
|
struct Texture;
|
||||||
struct Uniform;
|
struct Uniform;
|
||||||
|
@ -180,7 +180,7 @@ int luax_optmipmap(lua_State* L, int index, struct Texture* texture);
|
||||||
void luax_readattachments(lua_State* L, int index, struct Attachment* attachments, int* count);
|
void luax_readattachments(lua_State* L, int index, struct Attachment* attachments, int* count);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef LOVR_ENABLE_MATH
|
#ifndef LOVR_DISABLE_MATH
|
||||||
#include "math/pool.h" // TODO
|
#include "math/pool.h" // TODO
|
||||||
float* luax_tovector(lua_State* L, int index, VectorType* type);
|
float* luax_tovector(lua_State* L, int index, VectorType* type);
|
||||||
float* luax_checkvector(lua_State* L, int index, VectorType type, const char* expected);
|
float* luax_checkvector(lua_State* L, int index, VectorType type, const char* expected);
|
||||||
|
@ -192,7 +192,7 @@ int luax_readmat4(lua_State* L, int index, float* m, int scaleComponents);
|
||||||
uint64_t luax_checkrandomseed(lua_State* L, int index);
|
uint64_t luax_checkrandomseed(lua_State* L, int index);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef LOVR_ENABLE_PHYSICS
|
#ifndef LOVR_DISABLE_PHYSICS
|
||||||
struct Joint;
|
struct Joint;
|
||||||
struct Shape;
|
struct Shape;
|
||||||
void luax_pushjoint(lua_State* L, struct Joint* joint);
|
void luax_pushjoint(lua_State* L, struct Joint* joint);
|
||||||
|
|
|
@ -15,7 +15,7 @@ StringEntry lovrEventType[] = {
|
||||||
[EVENT_KEYPRESSED] = ENTRY("keypressed"),
|
[EVENT_KEYPRESSED] = ENTRY("keypressed"),
|
||||||
[EVENT_KEYRELEASED] = ENTRY("keyreleased"),
|
[EVENT_KEYRELEASED] = ENTRY("keyreleased"),
|
||||||
[EVENT_TEXTINPUT] = ENTRY("textinput"),
|
[EVENT_TEXTINPUT] = ENTRY("textinput"),
|
||||||
#ifdef LOVR_ENABLE_THREAD
|
#ifndef LOVR_DISABLE_THREAD
|
||||||
[EVENT_THREAD_ERROR] = ENTRY("threaderror"),
|
[EVENT_THREAD_ERROR] = ENTRY("threaderror"),
|
||||||
#endif
|
#endif
|
||||||
{ 0 }
|
{ 0 }
|
||||||
|
@ -220,7 +220,7 @@ static int nextEvent(lua_State* L) {
|
||||||
lua_pushinteger(L, event.data.text.codepoint);
|
lua_pushinteger(L, event.data.text.codepoint);
|
||||||
return 3;
|
return 3;
|
||||||
|
|
||||||
#ifdef LOVR_ENABLE_THREAD
|
#ifndef LOVR_DISABLE_THREAD
|
||||||
case EVENT_THREAD_ERROR:
|
case EVENT_THREAD_ERROR:
|
||||||
luax_pushtype(L, Thread, event.data.thread.thread);
|
luax_pushtype(L, Thread, event.data.thread.thread);
|
||||||
lua_pushstring(L, event.data.thread.error);
|
lua_pushstring(L, event.data.thread.error);
|
||||||
|
|
|
@ -4,34 +4,34 @@
|
||||||
|
|
||||||
const luaL_Reg lovrModules[] = {
|
const luaL_Reg lovrModules[] = {
|
||||||
{ "lovr", luaopen_lovr },
|
{ "lovr", luaopen_lovr },
|
||||||
#ifdef LOVR_ENABLE_AUDIO
|
#ifndef LOVR_DISABLE_AUDIO
|
||||||
{ "lovr.audio", luaopen_lovr_audio },
|
{ "lovr.audio", luaopen_lovr_audio },
|
||||||
#endif
|
#endif
|
||||||
#ifdef LOVR_ENABLE_DATA
|
#ifndef LOVR_DISABLE_DATA
|
||||||
{ "lovr.data", luaopen_lovr_data },
|
{ "lovr.data", luaopen_lovr_data },
|
||||||
#endif
|
#endif
|
||||||
#ifdef LOVR_ENABLE_EVENT
|
#ifndef LOVR_DISABLE_EVENT
|
||||||
{ "lovr.event", luaopen_lovr_event },
|
{ "lovr.event", luaopen_lovr_event },
|
||||||
#endif
|
#endif
|
||||||
#ifdef LOVR_ENABLE_FILESYSTEM
|
#ifndef LOVR_DISABLE_FILESYSTEM
|
||||||
{ "lovr.filesystem", luaopen_lovr_filesystem },
|
{ "lovr.filesystem", luaopen_lovr_filesystem },
|
||||||
#endif
|
#endif
|
||||||
#ifdef LOVR_ENABLE_GRAPHICS
|
#ifndef LOVR_DISABLE_GRAPHICS
|
||||||
{ "lovr.graphics", luaopen_lovr_graphics },
|
{ "lovr.graphics", luaopen_lovr_graphics },
|
||||||
#endif
|
#endif
|
||||||
#ifdef LOVR_ENABLE_HEADSET
|
#ifndef LOVR_DISABLE_HEADSET
|
||||||
{ "lovr.headset", luaopen_lovr_headset },
|
{ "lovr.headset", luaopen_lovr_headset },
|
||||||
#endif
|
#endif
|
||||||
#ifdef LOVR_ENABLE_MATH
|
#ifndef LOVR_DISABLE_MATH
|
||||||
{ "lovr.math", luaopen_lovr_math },
|
{ "lovr.math", luaopen_lovr_math },
|
||||||
#endif
|
#endif
|
||||||
#ifdef LOVR_ENABLE_PHYSICS
|
#ifndef LOVR_DISABLE_PHYSICS
|
||||||
{ "lovr.physics", luaopen_lovr_physics },
|
{ "lovr.physics", luaopen_lovr_physics },
|
||||||
#endif
|
#endif
|
||||||
#ifdef LOVR_ENABLE_THREAD
|
#ifndef LOVR_DISABLE_THREAD
|
||||||
{ "lovr.thread", luaopen_lovr_thread },
|
{ "lovr.thread", luaopen_lovr_thread },
|
||||||
#endif
|
#endif
|
||||||
#ifdef LOVR_ENABLE_TIMER
|
#ifndef LOVR_DISABLE_TIMER
|
||||||
{ "lovr.timer", luaopen_lovr_timer },
|
{ "lovr.timer", luaopen_lovr_timer },
|
||||||
#endif
|
#endif
|
||||||
{ NULL, NULL }
|
{ NULL, NULL }
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
#define __has_builtin(x) 0
|
#define __has_builtin(x) 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef LOVR_ENABLE_THREAD
|
#ifdef LOVR_DISABLE_THREAD
|
||||||
|
|
||||||
// Thread module is off, don't use atomics
|
// Thread module is off, don't use atomics
|
||||||
|
|
||||||
|
@ -39,7 +39,7 @@ static inline uint32_t ref_dec(Ref* ref) { return __atomic_sub_fetch(ref, 1, __A
|
||||||
|
|
||||||
// stdatomic.h doesn't work in c++ (except on Android, where it is fine)
|
// stdatomic.h doesn't work in c++ (except on Android, where it is fine)
|
||||||
#if !defined(__ANDROID__) && defined(__cplusplus)
|
#if !defined(__ANDROID__) && defined(__cplusplus)
|
||||||
#error "The header core/ref.h cannot currently be included from C++ when threading is enabled with this compiler. Either remove your ref.h include from any C++ files, or rebuild LOVR with -DLOVR_ENABLE_THREAD=OFF"
|
#error "The header core/ref.h cannot currently be included from C++ when threading is enabled with this compiler. Either remove your ref.h include from any C++ files, or rebuild LOVR with -DLOVR_DISABLE_THREAD=ON"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <stdatomic.h>
|
#include <stdatomic.h>
|
||||||
|
|
|
@ -53,7 +53,7 @@ void lovrEventDestroy() {
|
||||||
for (size_t i = state.head; i < state.events.length; i++) {
|
for (size_t i = state.head; i < state.events.length; i++) {
|
||||||
Event* event = &state.events.data[i];
|
Event* event = &state.events.data[i];
|
||||||
switch (event->type) {
|
switch (event->type) {
|
||||||
#if LOVR_ENABLE_THREAD
|
#ifndef LOVR_DISABLE_THREAD
|
||||||
case EVENT_THREAD_ERROR: lovrRelease(Thread, event->data.thread.thread); break;
|
case EVENT_THREAD_ERROR: lovrRelease(Thread, event->data.thread.thread); break;
|
||||||
#endif
|
#endif
|
||||||
case EVENT_CUSTOM:
|
case EVENT_CUSTOM:
|
||||||
|
@ -75,7 +75,7 @@ void lovrEventPump() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void lovrEventPush(Event event) {
|
void lovrEventPush(Event event) {
|
||||||
#ifdef LOVR_ENABLE_THREAD
|
#ifndef LOVR_DISABLE_THREAD
|
||||||
if (event.type == EVENT_THREAD_ERROR) {
|
if (event.type == EVENT_THREAD_ERROR) {
|
||||||
lovrRetain(event.data.thread.thread);
|
lovrRetain(event.data.thread.thread);
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,7 +16,7 @@ typedef enum {
|
||||||
EVENT_KEYRELEASED,
|
EVENT_KEYRELEASED,
|
||||||
EVENT_TEXTINPUT,
|
EVENT_TEXTINPUT,
|
||||||
EVENT_CUSTOM,
|
EVENT_CUSTOM,
|
||||||
#ifdef LOVR_ENABLE_THREAD
|
#ifndef LOVR_DISABLE_THREAD
|
||||||
EVENT_THREAD_ERROR,
|
EVENT_THREAD_ERROR,
|
||||||
#endif
|
#endif
|
||||||
} EventType;
|
} EventType;
|
||||||
|
|
Loading…
Reference in New Issue