mirror of
https://github.com/kanjitalk755/macemu.git
synced 2024-11-28 08:49:32 +00:00
Merge commit 'a11a61e48c716669aa128bae6fd8b2c67d53cc22' into rootless
This commit is contained in:
commit
49bf3fcfa2
@ -55,6 +55,7 @@ void disable_SDL2_macosx_menu_bar_keyboard_shortcuts() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef VIDEO_ROOTLESS
|
||||||
void make_window_transparent(SDL_Window * window)
|
void make_window_transparent(SDL_Window * window)
|
||||||
{
|
{
|
||||||
if (!window) {
|
if (!window) {
|
||||||
@ -73,6 +74,7 @@ void make_window_transparent(SDL_Window * window)
|
|||||||
CGColorRef clearColor = [NSColor clearColor].CGColor;
|
CGColorRef clearColor = [NSColor clearColor].CGColor;
|
||||||
NSWindow *cocoaWindow = wmInfo.info.cocoa.window;
|
NSWindow *cocoaWindow = wmInfo.info.cocoa.window;
|
||||||
NSView *sdlView = cocoaWindow.contentView;
|
NSView *sdlView = cocoaWindow.contentView;
|
||||||
|
sdlView.wantsLayer = YES;
|
||||||
sdlView.layer.backgroundColor = [NSColor clearColor].CGColor;
|
sdlView.layer.backgroundColor = [NSColor clearColor].CGColor;
|
||||||
if (SDL_GetWindowData(window, "observing") == NULL) {
|
if (SDL_GetWindowData(window, "observing") == NULL) {
|
||||||
NSNotificationCenter *nc = [NSNotificationCenter defaultCenter];
|
NSNotificationCenter *nc = [NSNotificationCenter defaultCenter];
|
||||||
@ -127,6 +129,7 @@ void update_window_mask_rects(SDL_Window * window, int h, const std::vector<SDL_
|
|||||||
maskLayer.affineTransform = CGAffineTransformScale(CGAffineTransformMakeTranslation(0, h), 1.0, -1.0);
|
maskLayer.affineTransform = CGAffineTransformScale(CGAffineTransformMakeTranslation(0, h), 1.0, -1.0);
|
||||||
CGPathRelease(path);
|
CGPathRelease(path);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
bool is_fullscreen_osx(SDL_Window * window)
|
bool is_fullscreen_osx(SDL_Window * window)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user