macOSX Rom path detecttion
This commit is contained in:
@@ -33,6 +33,7 @@
|
||||
#ifdef __APPLE__
|
||||
#include <string.h>
|
||||
#include <dispatch/dispatch.h>
|
||||
#include <mac/macOSXGlue.h>
|
||||
#ifdef __aarch64__
|
||||
#include <pthread.h>
|
||||
#endif
|
||||
@@ -587,12 +588,18 @@ usage:
|
||||
|
||||
if (vmrp && (path2[0] == '\0')) {
|
||||
#ifdef __APPLE__
|
||||
sprintf("%s/Library/Application Support/86Box/roms", getenv("HOME") ? getenv("HOME") : getpwuid(getuid())->pw_dir);
|
||||
getDefaultROMPath(path2);
|
||||
// This will return an absolut path to ~/Library/Application Support/bundleidentifier
|
||||
#else
|
||||
strcpy(path2, usr_path);
|
||||
plat_path_slash(path2);
|
||||
strcat(path2, "roms");
|
||||
#endif
|
||||
/// <summary>
|
||||
/// TODO: Add Plateform specific getDefaultROMPath to hide the awkfull code below
|
||||
/// </summary>
|
||||
/// <param name="path2></param>
|
||||
/// <returns>Correct Path of Default roms folder</returns>
|
||||
plat_path_slash(path2);
|
||||
}
|
||||
|
||||
|
||||
@@ -212,6 +212,9 @@ add_subdirectory(sio)
|
||||
add_subdirectory(scsi)
|
||||
add_subdirectory(sound)
|
||||
add_subdirectory(video)
|
||||
if(APPLE)
|
||||
add_subdirectory(mac)
|
||||
else()
|
||||
if (WIN32)
|
||||
add_subdirectory(win)
|
||||
else()
|
||||
|
||||
1
src/mac/CMakeLists.txt
Normal file
1
src/mac/CMakeLists.txt
Normal file
@@ -0,0 +1 @@
|
||||
include_directories("./mac")
|
||||
Reference in New Issue
Block a user