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 ...@@ -2771,7 +2771,6 @@ int cfgfile_load (struct uae_prefs *p, const TCHAR *filename, int *type, int ign
} }
end: end:
recursive--; recursive--;
write_log("cfgfile--");
fixup_prefs (p); fixup_prefs (p);
return v; return v;
} }
...@@ -4473,6 +4472,8 @@ static int bip_arcadia (struct uae_prefs *p, int config, int compa, int romcheck ...@@ -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) 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; int v = 0;
buildin_default_prefs (p); buildin_default_prefs (p);
......
...@@ -134,18 +134,7 @@ static int last_state = -1; ...@@ -134,18 +134,7 @@ static int last_state = -1;
int alt_pressed; int alt_pressed;
unsigned int mouse_capture; unsigned int mouse_capture;
/* TCHAR config_filename[256] = "";
* 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);
}
#ifdef WIN32_OR_X11 && GL_SHADER #ifdef WIN32_OR_X11 && GL_SHADER
PFNGLCREATEPROGRAMOBJECTARBPROC glCreateProgramObjectARB = NULL; PFNGLCREATEPROGRAMOBJECTARBPROC glCreateProgramObjectARB = NULL;
...@@ -1185,7 +1174,7 @@ static int graphics_subinit (void) ...@@ -1185,7 +1174,7 @@ static int graphics_subinit (void)
#endif /* USE_GL */ #endif /* USE_GL */
/* Set UAE window title and icon name */ /* Set UAE window title and icon name */
set_window_title (); setmaintitle ();
/* Mouse is now always grabbed when full-screen - to work around /* Mouse is now always grabbed when full-screen - to work around
* problems with full-screen mouse input in some SDL implementations */ * problems with full-screen mouse input in some SDL implementations */
...@@ -1292,7 +1281,7 @@ void graphics_notify_state (int state) ...@@ -1292,7 +1281,7 @@ void graphics_notify_state (int state)
if (last_state != state) { if (last_state != state) {
last_state = state; last_state = state;
if (display) if (display)
set_window_title (); setmaintitle ();
} }
} }
...@@ -2239,3 +2228,34 @@ int target_checkcapslock (int scancode, int *state) ...@@ -2239,3 +2228,34 @@ int target_checkcapslock (int scancode, int *state)
return 1; 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; ...@@ -78,7 +78,7 @@ int quickstart_floppy = 1, quickstart_cd = 0, quickstart_ntsc = 0;
int quickstart_cdtype = 0; int quickstart_cdtype = 0;
char quickstart_cddrive[16]; char quickstart_cddrive[16];
int quickstart_ok, quickstart_ok_floppy; int quickstart_ok, quickstart_ok_floppy;
extern TCHAR config_filename[256];
//---------- //----------
#import <Cocoa/Cocoa.h> #import <Cocoa/Cocoa.h>
...@@ -203,7 +203,6 @@ static BOOL wasFullscreen = NO; // used by ensureNotFullscreen() and restoreFull ...@@ -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:@"Reset" action:@selector(resetAmiga:) tag:0];
[self createMenuItemInMenu:vAmigaMenu withTitle:@"Hard Reset" action:@selector(resetAmiga:) tag:1]; [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]; // [self createMenuItemInMenu:vAmigaMenu withTitle:@"Pause" action:@selector(pauseAmiga:) tag:0];
#ifdef ACTION_REPLAY #ifdef ACTION_REPLAY
...@@ -540,7 +539,6 @@ static BOOL wasFullscreen = NO; // used by ensureNotFullscreen() and restoreFull ...@@ -540,7 +539,6 @@ static BOOL wasFullscreen = NO; // used by ensureNotFullscreen() and restoreFull
[menuItem release]; [menuItem release];
// SOUND MENU END // SOUND MENU END
// Create a menu for changing aspects of emulator control // Create a menu for changing aspects of emulator control
NSMenu *controlMenu = [[NSMenu alloc] initWithTitle:@"Control"]; NSMenu *controlMenu = [[NSMenu alloc] initWithTitle:@"Control"];
...@@ -646,7 +644,6 @@ static BOOL wasFullscreen = NO; // used by ensureNotFullscreen() and restoreFull ...@@ -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 // 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]; NSString *diskImage = [[NSString stringWithCString:gui_data.df[tag] encoding:NSASCIIStringEncoding] lastPathComponent];
[menuItem setTitle:[NSString stringWithFormat:@"DF%d (%@)",tag,diskImage]]; [menuItem setTitle:[NSString stringWithFormat:@"DF%d (%@)",tag,diskImage]];
//if (canSetHidden) [menuItem setHidden:NO];
return YES; return YES;
} }
...@@ -1040,8 +1037,7 @@ static BOOL wasFullscreen = NO; // used by ensureNotFullscreen() and restoreFull ...@@ -1040,8 +1037,7 @@ static BOOL wasFullscreen = NO; // used by ensureNotFullscreen() and restoreFull
NSString *nsfloppypath = [[NSUserDefaults standardUserDefaults] stringForKey:@"LastUsedDiskImagePath"]; NSString *nsfloppypath = [[NSUserDefaults standardUserDefaults] stringForKey:@"LastUsedDiskImagePath"];
/* If the configuration includes a setting for the "floppy_path" attribute /* 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; static int run_once = 0;
if (!run_once) { if (!run_once) {
run_once++; run_once++;
...@@ -1053,8 +1049,7 @@ static BOOL wasFullscreen = NO; // used by ensureNotFullscreen() and restoreFull ...@@ -1053,8 +1049,7 @@ static BOOL wasFullscreen = NO; // used by ensureNotFullscreen() and restoreFull
snprintf(homedir, MAX_PATH, "%s/", getenv("HOME")); snprintf(homedir, MAX_PATH, "%s/", getenv("HOME"));
/* The default value for floppy_path is "$HOME/". We only want to use it if the /* 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) if (strncmp(floppy_path, homedir, MAX_PATH) != 0)
nsfloppypath = [NSString stringWithCString:floppy_path encoding:NSASCIIStringEncoding]; nsfloppypath = [NSString stringWithCString:floppy_path encoding:NSASCIIStringEncoding];
} }
...@@ -1294,7 +1289,6 @@ static BOOL wasFullscreen = NO; // used by ensureNotFullscreen() and restoreFull ...@@ -1294,7 +1289,6 @@ static BOOL wasFullscreen = NO; // used by ensureNotFullscreen() and restoreFull
} }
} }
// types:SaveStateTypes
[oPanel beginSheetForDirectory:nssavestatepath file:@"" [oPanel beginSheetForDirectory:nssavestatepath file:@""
modalForWindow:[NSApp mainWindow] modalForWindow:[NSApp mainWindow]
modalDelegate:self modalDelegate:self
...@@ -1309,12 +1303,12 @@ static BOOL wasFullscreen = NO; // used by ensureNotFullscreen() and restoreFull ...@@ -1309,12 +1303,12 @@ static BOOL wasFullscreen = NO; // used by ensureNotFullscreen() and restoreFull
NSArray *files = [sheet filenames]; NSArray *files = [sheet filenames];
NSString *file = [files objectAtIndex:0]; 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"]; [[NSUserDefaults standardUserDefaults] setObject:[file stringByDeletingLastPathComponent] forKey:@"LastUsedSaveStatePath"];
write_log ("Loading SaveState from: %s ...", file); write_log ("Loading SaveState from: %s ...", sfile);
savestate_initsave (file, 0, 0, 0); savestate_initsave (sfile, 0, 0, 0);
savestate_state = STATE_DORESTORE; savestate_state = STATE_DORESTORE;
write_log ("done\n"); write_log ("done\n");
} }
...@@ -1355,7 +1349,7 @@ static BOOL wasFullscreen = NO; // used by ensureNotFullscreen() and restoreFull ...@@ -1355,7 +1349,7 @@ static BOOL wasFullscreen = NO; // used by ensureNotFullscreen() and restoreFull
write_log ("done\n"); write_log ("done\n");
} }
/*
- (void)QuickStart:(id)sender - (void)QuickStart:(id)sender
{ {
unsigned int romcheck = 0; unsigned int romcheck = 0;
...@@ -1366,24 +1360,7 @@ static BOOL wasFullscreen = NO; // used by ensureNotFullscreen() and restoreFull ...@@ -1366,24 +1360,7 @@ static BOOL wasFullscreen = NO; // used by ensureNotFullscreen() and restoreFull
changed_prefs.ntscmode = quickstart_ntsc != 0; changed_prefs.ntscmode = quickstart_ntsc != 0;
//quickstart_cd = chnaged_prefs.floppyslots[1].dfxtype == DRV_NONE && (quickstart_model == 8 || quickstart_model == 9); //quickstart_cd = chnaged_prefs.floppyslots[1].dfxtype == DRV_NONE && (quickstart_model == 8 || quickstart_model == 9);
config_filename[0] = 0; config_filename[0] = 0;
//uae_reset(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];*/
} }
- (void)resetAmiga:(id)sender - (void)resetAmiga:(id)sender
......
...@@ -681,10 +681,8 @@ void getfilepart (TCHAR *out, int size, const TCHAR *path) ...@@ -681,10 +681,8 @@ void getfilepart (TCHAR *out, int size, const TCHAR *path)
void refreshtitle (void) void refreshtitle (void)
{ {
/* if (isfullscreen () == 0)
if (isfullscreen () == 0) setmaintitle ();
setmaintitle (hMainWnd);
*/
} }
// win32gui // 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