mirror of
https://github.com/mauiaaron/apple2.git
synced 2025-03-18 17:30:10 +00:00
Fix ctor load priorities
This commit is contained in:
parent
c48e72c27f
commit
dcd0207525
@ -64,9 +64,12 @@
|
||||
#define OUTPARM
|
||||
#define INOUT
|
||||
|
||||
#define CTOR_PRIORITY_FIRST 101
|
||||
#define CTOR_PRIORITY_EARLY 111
|
||||
#define CTOR_PRIORITY_LATE 201
|
||||
|
||||
#if VIDEO_OPENGL
|
||||
#include "video_util/glUtil.h"
|
||||
#define CRASH_APP_ON_LOAD_BECAUSE_YAY_GJ_APPLE 0
|
||||
// 2015/04/01 ... early calls to glGetError()--before a context exists--causes segfaults on MacOS X
|
||||
extern bool safe_to_do_opengl_logging;
|
||||
static inline GLenum safeGLGetError(void) {
|
||||
|
@ -21,7 +21,7 @@
|
||||
static double orwl_timebase = 0.0;
|
||||
static uint64_t orwl_timestart = 0;
|
||||
|
||||
__attribute__((constructor))
|
||||
__attribute__((constructor(CTOR_PRIORITY_LATE)))
|
||||
static void __init_darwin_shim() {
|
||||
mach_timebase_info_data_t tb = { 0 };
|
||||
mach_timebase_info(&tb);
|
||||
|
@ -1273,9 +1273,9 @@ uint8_t floating_bus_hibit(const bool hibit) {
|
||||
return (b & ~0x80) | (hibit ? 0x80 : 0);
|
||||
}
|
||||
|
||||
__attribute__((constructor))
|
||||
__attribute__((constructor(CTOR_PRIORITY_LATE)))
|
||||
static void _init_interface(void) {
|
||||
LOG("display subsystem startup");
|
||||
LOG("Initializing display subsystem");
|
||||
_load_interface_fonts();
|
||||
}
|
||||
|
||||
|
@ -30,7 +30,7 @@ bool is_headless = false;
|
||||
color_mode_t color_mode = COLOR;
|
||||
const char *data_dir = NULL;
|
||||
|
||||
__attribute__((constructor))
|
||||
__attribute__((constructor(CTOR_PRIORITY_FIRST)))
|
||||
static void _init_common() {
|
||||
error_log = stderr;
|
||||
#if defined(CONFIG_DATADIR)
|
||||
|
@ -79,7 +79,7 @@ pthread_cond_t cpu_thread_cond = PTHREAD_COND_INITIALIZER;
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
__attribute__((constructor))
|
||||
__attribute__((constructor(CTOR_PRIORITY_LATE)))
|
||||
static void _init_timing(void) {
|
||||
pthread_mutexattr_t attr;
|
||||
pthread_mutexattr_init(&attr);
|
||||
|
@ -159,9 +159,9 @@ static bool cpuanim_onTouchEvent(interface_touch_event_t action, int pointer_cou
|
||||
}
|
||||
#endif
|
||||
|
||||
__attribute__((constructor))
|
||||
__attribute__((constructor(CTOR_PRIORITY_LATE)))
|
||||
static void _init_glcpuanim(void) {
|
||||
LOG("Registering CPU speed animations");
|
||||
LOG("Initializing message animation subsystem");
|
||||
video_backend->video_animation_show_cpuspeed = &cpuanim_show;
|
||||
glnode_registerNode(RENDER_MIDDLE, (GLNode){
|
||||
.setup = &cpuanim_init,
|
||||
|
@ -100,9 +100,9 @@ bool glnode_onTouchEvent(interface_touch_event_t action, int pointer_count, int
|
||||
}
|
||||
#endif
|
||||
|
||||
__attribute__((constructor))
|
||||
__attribute__((constructor(CTOR_PRIORITY_LATE)))
|
||||
static void _init_glnode_manager(void) {
|
||||
LOG("Initializing GLNode manager routines");
|
||||
LOG("Initializing GLNode manager subsystem");
|
||||
#if INTERFACE_TOUCH
|
||||
interface_onTouchEvent = &glnode_onTouchEvent;
|
||||
#endif
|
||||
|
@ -645,7 +645,7 @@ static void gltouchjoy_setTouchAxisValues(char north, char west, char east, char
|
||||
}
|
||||
}
|
||||
|
||||
__attribute__((constructor))
|
||||
__attribute__((constructor(CTOR_PRIORITY_LATE)))
|
||||
static void _init_gltouchjoy(void) {
|
||||
LOG("Registering OpenGL software touch joystick");
|
||||
|
||||
|
@ -851,7 +851,7 @@ static void gldriver_main_loop(void) {
|
||||
// fall through if not GLUT
|
||||
}
|
||||
|
||||
__attribute__((constructor))
|
||||
__attribute__((constructor(CTOR_PRIORITY_EARLY)))
|
||||
static void _init_glvideo(void) {
|
||||
LOG("Initializing OpenGL renderer");
|
||||
|
||||
|
@ -938,7 +938,7 @@ static void xdriver_render(void) {
|
||||
// no-op
|
||||
}
|
||||
|
||||
__attribute__((constructor))
|
||||
__attribute__((constructor(CTOR_PRIORITY_EARLY)))
|
||||
static void _init_xvideo(void) {
|
||||
LOG("Initializing X11 renderer");
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user