UI Updates

This commit is contained in:
Lior Halphon 2021-04-05 23:08:43 +03:00
parent bb3a73ff88
commit f67d3947d6
2 changed files with 5 additions and 3 deletions

View File

@ -770,7 +770,6 @@ static unsigned *multiplication_table_for_frequency(unsigned frequency)
[self.view screenSizeChanged];
[self loadROM];
[self reset:nil];
}
- (void) initMemoryView
@ -875,6 +874,9 @@ static unsigned *multiplication_table_for_frequency(unsigned frequency)
[[NSBundle mainBundle] loadNibNamed:@"GBS" owner:self topLevelObjects:nil];
[_mainWindow setContentSize:self.gbsPlayerView.bounds.size];
_mainWindow.styleMask &= ~NSWindowStyleMaskResizable;
dispatch_async(dispatch_get_main_queue(), ^{ // Cocoa is weird, no clue why it's needed
[_mainWindow standardWindowButton:NSWindowZoomButton].enabled = false;
});
[_mainWindow.contentView addSubview:self.gbsPlayerView];
self.gbsTitle.stringValue = [NSString stringWithCString:info->title encoding:NSISOLatin1StringEncoding] ?: @"GBS Player";
@ -913,7 +915,7 @@ static unsigned *multiplication_table_for_frequency(unsigned frequency)
GB_load_battery(&gb, [[self.fileURL URLByDeletingPathExtension] URLByAppendingPathExtension:@"ram"].path.UTF8String);
}
else if ([[[self.fileType pathExtension] lowercaseString] isEqualToString:@"gbs"]) {
GB_gbs_info_t info;
__block GB_gbs_info_t info;
GB_load_gbs(&gb, self.fileURL.path.UTF8String, &info);
[self prepareGBSInterface:&info];
}

View File

@ -412,7 +412,7 @@ int GB_load_gbs(GB_gameboy_t *gb, const char *path, GB_gbs_info_t *info)
LE16(gb->gbs_header.play_address),
LE16(gb->gbs_header.play_address) >> 8,
0x18, // JR pc ± $XX
-10 // To HALT
-10 // To HALT
}, 13);
GB_gbs_switch_track(gb, gb->gbs_header.first_track - 1);