Commit fe8dba47 authored by mtufan's avatar mtufan

puae 2.3.2

parent 62e45398
......@@ -2771,7 +2771,6 @@ int cfgfile_load (struct uae_prefs *p, const TCHAR *filename, int *type, int ign
}
end:
recursive--;
write_log("cfgfile--");
fixup_prefs (p);
return v;
}
......@@ -4473,6 +4472,8 @@ static int bip_arcadia (struct uae_prefs *p, int config, int compa, int romcheck
int built_in_prefs (struct uae_prefs *p, int model, int config, int compa, int romcheck)
{
write_log("built in model: %d, config: %d, compa: %d, romchk: %d\n", model, config, compa, romcheck);
int v = 0;
buildin_default_prefs (p);
......
......@@ -134,18 +134,7 @@ static int last_state = -1;
int alt_pressed;
unsigned int mouse_capture;
/*
* Set window title with some useful status info.
*/
static void set_window_title (void)
{
const char *title = PACKAGE_NAME;
if (last_state == UAE_STATE_PAUSED)
title = PACKAGE_NAME " (paused)";
SDL_WM_SetCaption (title, title);
}
TCHAR config_filename[256] = "";
#ifdef WIN32_OR_X11 && GL_SHADER
PFNGLCREATEPROGRAMOBJECTARBPROC glCreateProgramObjectARB = NULL;
......@@ -1185,7 +1174,7 @@ static int graphics_subinit (void)
#endif /* USE_GL */
/* Set UAE window title and icon name */
set_window_title ();
setmaintitle ();
/* Mouse is now always grabbed when full-screen - to work around
* problems with full-screen mouse input in some SDL implementations */
......@@ -1292,7 +1281,7 @@ void graphics_notify_state (int state)
if (last_state != state) {
last_state = state;
if (display)
set_window_title ();
setmaintitle ();
}
}
......@@ -2239,3 +2228,34 @@ int target_checkcapslock (int scancode, int *state)
return 1;
}
void setmaintitle (void)
{
TCHAR txt[1000], txt2[500];
const char *title = PACKAGE_NAME;
txt[0] = 0;
#ifdef INPREC
inprec_getstatus (txt);
#endif
if (currprefs.config_window_title[0]) {
_tcscat (txt, currprefs.config_window_title);
_tcscat (txt, " - ");
} else if (config_filename[0]) {
_tcscat (txt, "[");
_tcscat (txt, config_filename);
_tcscat (txt, "] - ");
}
_tcscat (txt, title);
txt2[0] = 0;
/* if (mouseactive > 0) {
WIN32GUI_LoadUIString (currprefs.win32_middle_mouse ? IDS_WINUAETITLE_MMB : IDS_WINUAETITLE_NORMAL,
txt2, sizeof (txt2) / sizeof (TCHAR));
}
*/
if (txt2[0]) {
_tcscat (txt, " - ");
_tcscat (txt, txt2);
}
SDL_WM_SetCaption(txt, txt);
}
\ No newline at end of file
......@@ -78,7 +78,7 @@ int quickstart_floppy = 1, quickstart_cd = 0, quickstart_ntsc = 0;
int quickstart_cdtype = 0;
char quickstart_cddrive[16];
int quickstart_ok, quickstart_ok_floppy;
extern TCHAR config_filename[256];
//----------
#import <Cocoa/Cocoa.h>
......@@ -203,7 +203,6 @@ static BOOL wasFullscreen = NO; // used by ensureNotFullscreen() and restoreFull
[self createMenuItemInMenu:vAmigaMenu withTitle:@"Reset" action:@selector(resetAmiga:) tag:0];
[self createMenuItemInMenu:vAmigaMenu withTitle:@"Hard Reset" action:@selector(resetAmiga:) tag:1];
// [self createMenuItemInMenu:vAmigaMenu withTitle:@"Hebe" action:@selector(hebeHebe:) tag:0];
// [self createMenuItemInMenu:vAmigaMenu withTitle:@"Pause" action:@selector(pauseAmiga:) tag:0];
#ifdef ACTION_REPLAY
......@@ -540,7 +539,6 @@ static BOOL wasFullscreen = NO; // used by ensureNotFullscreen() and restoreFull
[menuItem release];
// SOUND MENU END
// Create a menu for changing aspects of emulator control
NSMenu *controlMenu = [[NSMenu alloc] initWithTitle:@"Control"];
......@@ -646,7 +644,6 @@ static BOOL wasFullscreen = NO; // used by ensureNotFullscreen() and restoreFull
// There's a disk in the drive, show its name in the menu item
NSString *diskImage = [[NSString stringWithCString:gui_data.df[tag] encoding:NSASCIIStringEncoding] lastPathComponent];
[menuItem setTitle:[NSString stringWithFormat:@"DF%d (%@)",tag,diskImage]];
//if (canSetHidden) [menuItem setHidden:NO];
return YES;
}
......@@ -1040,8 +1037,7 @@ static BOOL wasFullscreen = NO; // used by ensureNotFullscreen() and restoreFull
NSString *nsfloppypath = [[NSUserDefaults standardUserDefaults] stringForKey:@"LastUsedDiskImagePath"];
/* If the configuration includes a setting for the "floppy_path" attribute
* start the OpenPanel in that directory.. but only the first time.
*/
* start the OpenPanel in that directory.. but only the first time. */
static int run_once = 0;
if (!run_once) {
run_once++;
......@@ -1053,8 +1049,7 @@ static BOOL wasFullscreen = NO; // used by ensureNotFullscreen() and restoreFull
snprintf(homedir, MAX_PATH, "%s/", getenv("HOME"));
/* The default value for floppy_path is "$HOME/". We only want to use it if the
* user provided an actual value though, so we don't use it if it equals "$HOME/"
*/
* user provided an actual value though, so we don't use it if it equals "$HOME/" */
if (strncmp(floppy_path, homedir, MAX_PATH) != 0)
nsfloppypath = [NSString stringWithCString:floppy_path encoding:NSASCIIStringEncoding];
}
......@@ -1294,7 +1289,6 @@ static BOOL wasFullscreen = NO; // used by ensureNotFullscreen() and restoreFull
}
}
// types:SaveStateTypes
[oPanel beginSheetForDirectory:nssavestatepath file:@""
modalForWindow:[NSApp mainWindow]
modalDelegate:self
......@@ -1309,12 +1303,12 @@ static BOOL wasFullscreen = NO; // used by ensureNotFullscreen() and restoreFull
NSArray *files = [sheet filenames];
NSString *file = [files objectAtIndex:0];
// lossyASCIICopy (changed_prefs.cartfile, file, COCOA_GUI_MAX_PATH);
char *sfile = [file UTF8String];
[[NSUserDefaults standardUserDefaults] setObject:[file stringByDeletingLastPathComponent] forKey:@"LastUsedSaveStatePath"];
write_log ("Loading SaveState from: %s ...", file);
savestate_initsave (file, 0, 0, 0);
write_log ("Loading SaveState from: %s ...", sfile);
savestate_initsave (sfile, 0, 0, 0);
savestate_state = STATE_DORESTORE;
write_log ("done\n");
}
......@@ -1355,7 +1349,7 @@ static BOOL wasFullscreen = NO; // used by ensureNotFullscreen() and restoreFull
write_log ("done\n");
}
/*
- (void)QuickStart:(id)sender
{
unsigned int romcheck = 0;
......@@ -1366,24 +1360,7 @@ static BOOL wasFullscreen = NO; // used by ensureNotFullscreen() and restoreFull
changed_prefs.ntscmode = quickstart_ntsc != 0;
//quickstart_cd = chnaged_prefs.floppyslots[1].dfxtype == DRV_NONE && (quickstart_model == 8 || quickstart_model == 9);
config_filename[0] = 0;
uae_reset(0);
}
*/
- (void)hebeHebe:(id)sender
{
NSRect frame = NSMakeRect(100, 100, 200, 200);
NSUInteger styleMask;
NSRect rect = [NSWindow contentRectForFrameRect:frame styleMask:styleMask];
NSWindow *window = [[NSWindow alloc] initWithContentRect:rect styleMask:styleMask backing:NSBackingStoreBuffered defer:false];
[window center];
[window makeKeyAndOrderFront: window];
/* NSTabViewItem* item=[[NSTabViewItem alloc] initWithIdentifier:identifier];
[item setLabel:label];
[item setView:newView];
[tabView addTabViewItem:item];*/
//uae_reset(0);
}
- (void)resetAmiga:(id)sender
......
......@@ -681,10 +681,8 @@ void getfilepart (TCHAR *out, int size, const TCHAR *path)
void refreshtitle (void)
{
/*
if (isfullscreen () == 0)
setmaintitle (hMainWnd);
*/
if (isfullscreen () == 0)
setmaintitle ();
}
// win32gui
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment