Merge pull request #119 from asvitkine/cleanup_headers

Clean up forward declarations in favor of header files.
This commit is contained in:
kanjitalk755 2022-04-05 14:05:14 +09:00 committed by GitHub
commit 0f7f1543ed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 18 additions and 6 deletions

View File

@ -101,6 +101,8 @@ extern void * vm_acquire(size_t size, int options = VM_MAP_DEFAULT);
extern void * vm_acquire_reserved(size_t size);
extern int vm_init_reserved(void * host_address);
/* Allocate zero-filled memory at exactly ADDR (which must be page-aligned).
Returns 0 if successful, -1 on errors. */

View File

@ -24,6 +24,17 @@
// Invokes the specified function with an NSAutoReleasePool in place.
void NSAutoReleasePool_wrap(void (*fn)(void));
#ifdef USE_SDL
#if SDL_VERSION_ATLEAST(2,0,0)
void disable_SDL2_macosx_menu_bar_keyboard_shortcuts();
bool is_fullscreen_osx(SDL_Window * window);
#endif
#endif
void set_menu_bar_visible_osx(bool visible);
void set_current_directory();
bool MetalIsAvailable();
#endif

View File

@ -20,8 +20,8 @@
#include <Cocoa/Cocoa.h>
#include "sysdeps.h"
#include "utils_macosx.h"
#include <SDL.h>
#include "utils_macosx.h"
#if SDL_VERSION_ATLEAST(2,0,0)
#include <SDL_syswm.h>

View File

@ -1718,7 +1718,6 @@ static bool is_fullscreen(SDL_Window * window)
// involves fullscreen/windowed toggles via window-manager UI controls).
// Until it does, or adds a facility to do so, we'll use a platform-specific
// code path to detect fullscreen changes.
extern bool is_fullscreen_osx(SDL_Window * window);
return is_fullscreen_osx(sdl_window);
#else
if (!window) {
@ -2272,7 +2271,6 @@ static int SDLCALL on_sdl_event_generated(void *userdata, SDL_Event * event)
// cursor is near the top of the screen, lest the
// guest OS' menu bar be obscured.
if (is_full) {
extern void set_menu_bar_visible_osx(bool);
set_menu_bar_visible_osx(false);
}
#endif

View File

@ -43,6 +43,10 @@
# include <sys/mman.h>
#endif
#if __MACOSX__
# include "utils_macosx.h"
#endif
#if !EMULATED_68K && defined(__NetBSD__)
# include <m68k/sync_icache.h>
# include <m68k/frame.h>
@ -579,7 +583,6 @@ int main(int argc, char **argv)
//
// HACK: disable these shortcuts, while leaving all other pieces of SDL2's
// menu bar in-place.
extern void disable_SDL2_macosx_menu_bar_keyboard_shortcuts();
disable_SDL2_macosx_menu_bar_keyboard_shortcuts();
#endif

View File

@ -2217,8 +2217,6 @@ rti:;
}
#endif
extern int vm_init_reserved(void *hostAddress);
/*
* Helpers to share 32-bit addressable data with MacOS
*/