mirror of
https://github.com/kanjitalk755/macemu.git
synced 2024-11-24 11:30:52 +00:00
embiggen menu bar to host's size
This commit is contained in:
parent
68fcaa117b
commit
93797ff488
@ -61,6 +61,9 @@ void make_window_transparent(SDL_Window * window)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
extern int native_menubar_size;
|
||||||
|
native_menubar_size = (int)[[NSApp mainMenu] menuBarHeight];
|
||||||
|
|
||||||
SDL_SysWMinfo wmInfo;
|
SDL_SysWMinfo wmInfo;
|
||||||
SDL_VERSION(&wmInfo.version);
|
SDL_VERSION(&wmInfo.version);
|
||||||
if (!SDL_GetWindowWMInfo(window, &wmInfo)) {
|
if (!SDL_GetWindowWMInfo(window, &wmInfo)) {
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
|
|
||||||
extern void make_window_transparent(SDL_Window * window);
|
extern void make_window_transparent(SDL_Window * window);
|
||||||
extern void update_sdl_video(SDL_Surface *s, int numrects, SDL_Rect *rects);
|
extern void update_sdl_video(SDL_Surface *s, int numrects, SDL_Rect *rects);
|
||||||
|
int native_menubar_size = 0;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Rootless mode support
|
* Rootless mode support
|
||||||
@ -231,6 +232,10 @@ uint16 menuBarHeight;
|
|||||||
bool inMenuSelect = false;
|
bool inMenuSelect = false;
|
||||||
|
|
||||||
static SDL_Rect MaskMenuBar() {
|
static SDL_Rect MaskMenuBar() {
|
||||||
|
if (native_menubar_size && ReadMacInt16(0x0BAA) == 20) {
|
||||||
|
// Embiggen menubar
|
||||||
|
WriteMacInt16(0xBAA, native_menubar_size);
|
||||||
|
}
|
||||||
if (!inMenuSelect) {
|
if (!inMenuSelect) {
|
||||||
menuBarHeight = ReadMacInt16(0x0BAA);
|
menuBarHeight = ReadMacInt16(0x0BAA);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user