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:
parent
11403180db
commit
bb6fe7d06b
|
@ -5985,7 +5985,7 @@ void OGLHUDLayer::RefreshInfo()
|
||||||
{
|
{
|
||||||
ss << "RTC: " << this->_lastRTCString << "\n";
|
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)
|
if (newTextBoxWidth > this->_textBoxWidth)
|
||||||
{
|
{
|
||||||
this->_textBoxWidth = newTextBoxWidth;
|
this->_textBoxWidth = newTextBoxWidth;
|
||||||
|
|
|
@ -36,7 +36,6 @@ typedef struct
|
||||||
CocoaDSCore *cdsCore;
|
CocoaDSCore *cdsCore;
|
||||||
int state;
|
int state;
|
||||||
bool isFrameSkipEnabled;
|
bool isFrameSkipEnabled;
|
||||||
size_t frameCount;
|
|
||||||
NSUInteger frameJumpTarget;
|
NSUInteger frameJumpTarget;
|
||||||
int framesToSkip;
|
int framesToSkip;
|
||||||
uint64_t timeBudgetMachAbsTime;
|
uint64_t timeBudgetMachAbsTime;
|
||||||
|
|
|
@ -182,7 +182,6 @@ volatile bool execute = true;
|
||||||
threadParam.cdsCore = self;
|
threadParam.cdsCore = self;
|
||||||
threadParam.state = CORESTATE_PAUSE;
|
threadParam.state = CORESTATE_PAUSE;
|
||||||
threadParam.isFrameSkipEnabled = true;
|
threadParam.isFrameSkipEnabled = true;
|
||||||
threadParam.frameCount = 0;
|
|
||||||
threadParam.framesToSkip = 0;
|
threadParam.framesToSkip = 0;
|
||||||
threadParam.frameJumpTarget = 0;
|
threadParam.frameJumpTarget = 0;
|
||||||
|
|
||||||
|
@ -1167,11 +1166,6 @@ static void* RunCoreThread(void *arg)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (param->framesToSkip == 0)
|
|
||||||
{
|
|
||||||
param->frameCount++;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Make sure that the mic level is updated at least once per frame, regardless
|
// Make sure that the mic level is updated at least once per frame, regardless
|
||||||
// of whether the NDS actually reads the mic or not.
|
// of whether the NDS actually reads the mic or not.
|
||||||
[cdsController updateMicLevel];
|
[cdsController updateMicLevel];
|
||||||
|
@ -1187,7 +1181,7 @@ static void* RunCoreThread(void *arg)
|
||||||
{
|
{
|
||||||
for (CocoaDSOutput *cdsOutput in cdsOutputList)
|
for (CocoaDSOutput *cdsOutput in cdsOutputList)
|
||||||
{
|
{
|
||||||
//if (![cdsOutput isKindOfClass:[CocoaDSDisplay class]])
|
if (![cdsOutput isKindOfClass:[CocoaDSDisplay class]] || param->framesToSkip <= 0)
|
||||||
{
|
{
|
||||||
[cdsOutput doCoreEmuFrame];
|
[cdsOutput doCoreEmuFrame];
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,16 +38,12 @@ typedef struct
|
||||||
|
|
||||||
@interface CocoaDSOutput : CocoaDSThread
|
@interface CocoaDSOutput : CocoaDSThread
|
||||||
{
|
{
|
||||||
BOOL isStateChanged;
|
|
||||||
NSUInteger frameCount;
|
|
||||||
NSMutableDictionary *property;
|
NSMutableDictionary *property;
|
||||||
|
|
||||||
pthread_mutex_t *mutexConsume;
|
pthread_mutex_t *mutexConsume;
|
||||||
pthread_rwlock_t *rwlockProducer;
|
pthread_rwlock_t *rwlockProducer;
|
||||||
}
|
}
|
||||||
|
|
||||||
@property (assign) BOOL isStateChanged;
|
|
||||||
@property (assign) NSUInteger frameCount;
|
|
||||||
@property (readonly) NSMutableDictionary *property;
|
@property (readonly) NSMutableDictionary *property;
|
||||||
@property (assign) pthread_rwlock_t *rwlockProducer;
|
@property (assign) pthread_rwlock_t *rwlockProducer;
|
||||||
@property (readonly) pthread_mutex_t *mutexConsume;
|
@property (readonly) pthread_mutex_t *mutexConsume;
|
||||||
|
|
|
@ -38,8 +38,6 @@
|
||||||
|
|
||||||
@implementation CocoaDSOutput
|
@implementation CocoaDSOutput
|
||||||
|
|
||||||
@synthesize isStateChanged;
|
|
||||||
@synthesize frameCount;
|
|
||||||
@synthesize property;
|
@synthesize property;
|
||||||
@synthesize mutexConsume;
|
@synthesize mutexConsume;
|
||||||
@synthesize rwlockProducer;
|
@synthesize rwlockProducer;
|
||||||
|
@ -51,10 +49,7 @@
|
||||||
{
|
{
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
||||||
isStateChanged = NO;
|
|
||||||
frameCount = 0;
|
|
||||||
|
|
||||||
property = [[NSMutableDictionary alloc] init];
|
property = [[NSMutableDictionary alloc] init];
|
||||||
[property setValue:[NSDate date] forKey:@"outputTime"];
|
[property setValue:[NSDate date] forKey:@"outputTime"];
|
||||||
|
|
||||||
|
@ -102,7 +97,7 @@
|
||||||
|
|
||||||
- (void) handleEmuFrameProcessed
|
- (void) handleEmuFrameProcessed
|
||||||
{
|
{
|
||||||
self.frameCount++;
|
// The base method does nothing.
|
||||||
}
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
Loading…
Reference in New Issue