mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-12 09:06:55 -04:00
Use DynamicLib_Get2 instead of dlsym for GetMenuBarEventTarget
using -2 for lib probably breaks powerpc, which I will get around to fixing eventually
This commit is contained in:
parent
35ed41ab81
commit
04b7cd62ee
@ -2058,7 +2058,6 @@ void Window_DisableRawMouse(void) {
|
|||||||
*#########################################################################################################################*/
|
*#########################################################################################################################*/
|
||||||
#if defined CC_BUILD_CARBON
|
#if defined CC_BUILD_CARBON
|
||||||
#include <Carbon/Carbon.h>
|
#include <Carbon/Carbon.h>
|
||||||
#include <dlfcn.h>
|
|
||||||
|
|
||||||
static WindowRef win_handle;
|
static WindowRef win_handle;
|
||||||
static cc_bool win_fullscreen, showingDialog;
|
static cc_bool win_fullscreen, showingDialog;
|
||||||
@ -2311,8 +2310,9 @@ static void HookEvents(void) {
|
|||||||
/* However, we cannot use that since the event loop is managed by us instead. */
|
/* However, we cannot use that since the event loop is managed by us instead. */
|
||||||
/* Unfortunately, there is no proper API to duplicate that behaviour, so reply */
|
/* Unfortunately, there is no proper API to duplicate that behaviour, so reply */
|
||||||
/* on the undocumented GetMenuBarEventTarget to achieve similar behaviour. */
|
/* on the undocumented GetMenuBarEventTarget to achieve similar behaviour. */
|
||||||
/* TODO: Use DynamicLib API instead of dlsym */
|
/* TODO: Check if this still works on PowerPC */
|
||||||
getMenuBarEventTarget = dlsym(RTLD_DEFAULT, "GetMenuBarEventTarget");
|
#define _RTLD_DEFAULT ((void*)-2)
|
||||||
|
getMenuBarEventTarget = DynamicLib_Get2(_RTLD_DEFAULT, "GetMenuBarEventTarget");
|
||||||
InstallStandardEventHandler(GetApplicationEventTarget());
|
InstallStandardEventHandler(GetApplicationEventTarget());
|
||||||
|
|
||||||
/* TODO: Why does this not work properly until user activates another window */
|
/* TODO: Why does this not work properly until user activates another window */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user