Yet more fixes to the OSX menus; it seems the actions tied to the

Control key weren't being passed to the core code.

Yet more tweaks to the documentation.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2008 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
stephena 2010-04-13 16:24:44 +00:00
parent b022ffe74e
commit e37fa7f520
4 changed files with 27 additions and 22 deletions

View File

@ -81,8 +81,9 @@
were redundant.
* Removed the 'loadlst' debugger command and the ability to use a
DASM .lst file. This code was incomplete, and with the recent
disassembler improvements this support is no longer feasible.
DASM .lst file. This code was incomplete, and no longer fits with
the recent disassembler improvements. Support for this may return
in a future release.
* Modified 'disasm' debugger command to accept a second argument
indicating the number of lines to disassemble.
@ -154,7 +155,8 @@
since the same state file can now be loaded from different ROMs,
as long as the cart type stays the same. This also fixes a bug
where loading from a non-existent state file could cause Stella
to crash.
to crash. Because of these changes, old state files will no longer
work.
* Fixed bug in certain editable text fields, where pressing Return/Enter
would disable any further input.

View File

@ -419,7 +419,8 @@
<ul>
<li><b>Binary DMG file</b> (Stella-<i>release</i>-macosx.dmg)
<ol>
<li>Mount the disk image, then copy the Stella-<i>release</i>-macosx.dmg folder to your hard drive</li>
<li>Double-click the disk image, open the 'Stella' folder, then copy the
<b>Stella.app</b> package to your 'Applications' folder.</li>
</ol>
</li>
<li><b>Compressed tarball : building from source code</b> (stella-<i>release</i>-src.tar.gz)
@ -435,7 +436,7 @@
<li>Run the script <b>Create_build.sh</b>, located in the src/macosx directory.
This will create a DMG file on your desktop.</li>
&nbsp;&nbsp;&nbsp;<b>OR</b>
<li>Copy the <b>Stella.app</b> package somewhere on your system</li>
<li>Copy the <b>Stella.app</b> package to your 'Applications' folder.</li>
</ul>
<li>For compiling the Intel version only, open the <b>stella-<i>release</i>/src/macosx/stella_intel.xcodeproj</b> file instead, and continue from
step 2 above.</li>

View File

@ -43,7 +43,7 @@
}
+ (Menus *)sharedInstance;
- (void)pushKeyEvent:(int)key:(bool)shift:(bool)cmd;
- (void)pushKeyEvent:(int)key:(bool)shift:(bool)cmd:(bool)control;
- (IBAction)paddleChange:(id) sender;
- (IBAction)biggerScreen:(id)sender;
- (IBAction)smallerScreen:(id)sender;

View File

@ -130,7 +130,7 @@ static Menus *sharedInstance = nil;
return(self);
}
-(void)pushKeyEvent:(int)key:(bool)shift:(bool)cmd
-(void)pushKeyEvent:(int)key:(bool)shift:(bool)cmd:(bool)control
{
SDL_Event theEvent;
@ -140,9 +140,11 @@ static Menus *sharedInstance = nil;
theEvent.key.keysym.sym = key;
theEvent.key.keysym.mod = 0;
if (cmd)
theEvent.key.keysym.mod = KMOD_LMETA;
theEvent.key.keysym.mod = KMOD_META;
else if (control)
theEvent.key.keysym.mod = KMOD_CTRL;
if (shift)
theEvent.key.keysym.mod |= KMOD_LSHIFT;
theEvent.key.keysym.mod |= KMOD_SHIFT;
theEvent.key.keysym.unicode = 0;
SDL_PushEvent(&theEvent);
}
@ -152,38 +154,38 @@ static Menus *sharedInstance = nil;
switch([sender tag])
{
case 0:
[self pushKeyEvent:SDLK_0:NO:YES];
[self pushKeyEvent:SDLK_0:NO:NO:YES];
break;
case 1:
[self pushKeyEvent:SDLK_1:NO:YES];
[self pushKeyEvent:SDLK_1:NO:NO:YES];
break;
case 2:
[self pushKeyEvent:SDLK_2:NO:YES];
[self pushKeyEvent:SDLK_2:NO:NO:YES];
break;
case 3:
[self pushKeyEvent:SDLK_3:NO:YES];
[self pushKeyEvent:SDLK_3:NO:NO:YES];
break;
}
}
- (IBAction)biggerScreen:(id)sender
{
[self pushKeyEvent:SDLK_EQUALS:NO:YES];
[self pushKeyEvent:SDLK_EQUALS:NO:YES:NO];
}
- (IBAction)smallerScreen:(id)sender
{
[self pushKeyEvent:SDLK_MINUS:NO:YES];
[self pushKeyEvent:SDLK_MINUS:NO:YES:NO];
}
- (IBAction)fullScreen:(id)sender
{
[self pushKeyEvent:SDLK_RETURN:NO:YES];
[self pushKeyEvent:SDLK_RETURN:NO:YES:NO];
}
- (IBAction)openCart:(id)sender
{
[self pushKeyEvent:SDLK_ESCAPE:NO:NO];
[self pushKeyEvent:SDLK_ESCAPE:NO:NO:NO];
// Fixme - This should work like the other keys, but instead
// if you send the LauncherOpen event, it crashes SDL in
// the poll loop.
@ -192,17 +194,17 @@ static Menus *sharedInstance = nil;
- (IBAction)restartGame:(id)sender
{
[self pushKeyEvent:SDLK_r:NO:YES];
[self pushKeyEvent:SDLK_r:NO:NO:YES];
}
- (IBAction)grabMouse:(id)sender
{
[self pushKeyEvent:SDLK_g:NO:YES];
[self pushKeyEvent:SDLK_g:NO:NO:YES];
}
- (IBAction)doPrefs:(id)sender
{
[self pushKeyEvent:SDLK_TAB:NO:NO];
[self pushKeyEvent:SDLK_TAB:NO:NO:NO];
}
- (IBAction)volumePlus:(id)sender
@ -237,8 +239,8 @@ static Menus *sharedInstance = nil;
[preferencesMenuItem setTarget:nil];
[openMenuItem setTarget:nil];
[restartMenuItem setTarget:nil];
[screenBiggerMenuItem setTarget:self];
[screenSmallerMenuItem setTarget:self];
[screenBiggerMenuItem setTarget:nil];
[screenSmallerMenuItem setTarget:nil];
[fullScreenMenuItem setTarget:self];
[mousePaddle0MenuItem setTarget:nil];
[mousePaddle1MenuItem setTarget:nil];