mirror of
https://github.com/kanjitalk755/macemu.git
synced 2024-06-28 22:29:46 +00:00
SS preference "Save and Quit" button
This commit is contained in:
parent
10de3e7239
commit
805ba753b2
|
@ -106,7 +106,7 @@ static uint32 fs_data = 0; // Mac address of global data
|
||||||
static char FS_NAME[32], VOLUME_NAME[32];
|
static char FS_NAME[32], VOLUME_NAME[32];
|
||||||
|
|
||||||
// This directory is our root (read from prefs)
|
// This directory is our root (read from prefs)
|
||||||
static const char *RootPath;
|
static char RootPath[MAX_PATH_LENGTH];
|
||||||
static bool ready = false;
|
static bool ready = false;
|
||||||
static struct stat root_stat;
|
static struct stat root_stat;
|
||||||
|
|
||||||
|
@ -196,7 +196,7 @@ static uint32 get_creation_time(const char *path)
|
||||||
{
|
{
|
||||||
if (path == NULL)
|
if (path == NULL)
|
||||||
return 0;
|
return 0;
|
||||||
if (path == RootPath) {
|
if (!strcmp(path, RootPath)) {
|
||||||
static uint32 root_crtime = UINT_MAX;
|
static uint32 root_crtime = UINT_MAX;
|
||||||
if (root_crtime == UINT_MAX)
|
if (root_crtime == UINT_MAX)
|
||||||
root_crtime = do_get_creation_time(path);
|
root_crtime = do_get_creation_time(path);
|
||||||
|
@ -435,7 +435,11 @@ void ExtFSInit(void)
|
||||||
p->guest_name[31] = 0;
|
p->guest_name[31] = 0;
|
||||||
|
|
||||||
// Find path for root
|
// Find path for root
|
||||||
if ((RootPath = PrefsFindString("extfs")) != NULL) {
|
*RootPath = 0;
|
||||||
|
const char *path = PrefsFindString("extfs");
|
||||||
|
if (path != NULL) {
|
||||||
|
strncpy(RootPath, path, MAX_PATH_LENGTH - 1);
|
||||||
|
RootPath[MAX_PATH_LENGTH - 1] = 0;
|
||||||
if (stat(RootPath, &root_stat))
|
if (stat(RootPath, &root_stat))
|
||||||
return;
|
return;
|
||||||
if (!S_ISDIR(root_stat.st_mode))
|
if (!S_ISDIR(root_stat.st_mode))
|
||||||
|
|
5178
SheepShaver/src/MacOSX/Launcher/English.lproj/VMSettingsWindow.nib/designable.nib
generated
Executable file → Normal file
5178
SheepShaver/src/MacOSX/Launcher/English.lproj/VMSettingsWindow.nib/designable.nib
generated
Executable file → Normal file
File diff suppressed because it is too large
Load Diff
BIN
SheepShaver/src/MacOSX/Launcher/English.lproj/VMSettingsWindow.nib/keyedobjects.nib
generated
Executable file → Normal file
BIN
SheepShaver/src/MacOSX/Launcher/English.lproj/VMSettingsWindow.nib/keyedobjects.nib
generated
Executable file → Normal file
Binary file not shown.
|
@ -30,6 +30,8 @@
|
||||||
|
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
|
#include "SDL.h"
|
||||||
|
|
||||||
// NSInteger was added in 10.5 SDK.
|
// NSInteger was added in 10.5 SDK.
|
||||||
#if MAC_OS_X_VERSION_MIN_REQUIRED < 1050
|
#if MAC_OS_X_VERSION_MIN_REQUIRED < 1050
|
||||||
#if __LP64__ || NS_BUILD_32_LIKE_64
|
#if __LP64__ || NS_BUILD_32_LIKE_64
|
||||||
|
@ -478,6 +480,10 @@ static NSString *makeRelativeIfNecessary(NSString *path)
|
||||||
[[self window] close];
|
[[self window] close];
|
||||||
[NSApp stopModal];
|
[NSApp stopModal];
|
||||||
cancelWasClicked = NO;
|
cancelWasClicked = NO;
|
||||||
|
|
||||||
|
// quit
|
||||||
|
SDL_Event event = { .type = SDL_QUIT };
|
||||||
|
SDL_PushEvent(&event);
|
||||||
}
|
}
|
||||||
|
|
||||||
- (BOOL) cancelWasClicked
|
- (BOOL) cancelWasClicked
|
||||||
|
|
Loading…
Reference in New Issue
Block a user