Cocoa Port:

- Fix bug where using Frame Jump or executing the emulation faster than 1.00x would cause the execution speed to be limited by Vertical Sync.
- Do some code cleanup on CocoaDSOutput.
- Expand the text box further when the RTC is shown.
This commit is contained in:
rogerman 2015-10-25 02:11:09 +00:00
parent 11403180db
commit bb6fe7d06b
5 changed files with 4 additions and 20 deletions

View File

@ -5985,7 +5985,7 @@ void OGLHUDLayer::RefreshInfo()
{
ss << "RTC: " << this->_lastRTCString << "\n";
const GLint newTextBoxWidth = (charSize * 10.3f) + 6.5f;
const GLint newTextBoxWidth = (charSize * 10.7f) + 6.5f;
if (newTextBoxWidth > this->_textBoxWidth)
{
this->_textBoxWidth = newTextBoxWidth;

View File

@ -36,7 +36,6 @@ typedef struct
CocoaDSCore *cdsCore;
int state;
bool isFrameSkipEnabled;
size_t frameCount;
NSUInteger frameJumpTarget;
int framesToSkip;
uint64_t timeBudgetMachAbsTime;

View File

@ -182,7 +182,6 @@ volatile bool execute = true;
threadParam.cdsCore = self;
threadParam.state = CORESTATE_PAUSE;
threadParam.isFrameSkipEnabled = true;
threadParam.frameCount = 0;
threadParam.framesToSkip = 0;
threadParam.frameJumpTarget = 0;
@ -1167,11 +1166,6 @@ static void* RunCoreThread(void *arg)
continue;
}
if (param->framesToSkip == 0)
{
param->frameCount++;
}
// Make sure that the mic level is updated at least once per frame, regardless
// of whether the NDS actually reads the mic or not.
[cdsController updateMicLevel];
@ -1187,7 +1181,7 @@ static void* RunCoreThread(void *arg)
{
for (CocoaDSOutput *cdsOutput in cdsOutputList)
{
//if (![cdsOutput isKindOfClass:[CocoaDSDisplay class]])
if (![cdsOutput isKindOfClass:[CocoaDSDisplay class]] || param->framesToSkip <= 0)
{
[cdsOutput doCoreEmuFrame];
}

View File

@ -38,16 +38,12 @@ typedef struct
@interface CocoaDSOutput : CocoaDSThread
{
BOOL isStateChanged;
NSUInteger frameCount;
NSMutableDictionary *property;
pthread_mutex_t *mutexConsume;
pthread_rwlock_t *rwlockProducer;
}
@property (assign) BOOL isStateChanged;
@property (assign) NSUInteger frameCount;
@property (readonly) NSMutableDictionary *property;
@property (assign) pthread_rwlock_t *rwlockProducer;
@property (readonly) pthread_mutex_t *mutexConsume;

View File

@ -38,8 +38,6 @@
@implementation CocoaDSOutput
@synthesize isStateChanged;
@synthesize frameCount;
@synthesize property;
@synthesize mutexConsume;
@synthesize rwlockProducer;
@ -51,10 +49,7 @@
{
return self;
}
isStateChanged = NO;
frameCount = 0;
property = [[NSMutableDictionary alloc] init];
[property setValue:[NSDate date] forKey:@"outputTime"];
@ -102,7 +97,7 @@
- (void) handleEmuFrameProcessed
{
self.frameCount++;
// The base method does nothing.
}
@end