mirror of https://github.com/bsnes-emu/bsnes.git
Proper window minimum size handling
This commit is contained in:
parent
7b36ee10a4
commit
112a174f4a
|
@ -286,7 +286,13 @@ static void printImage(GB_gameboy_t *gb, uint32_t *image, uint8_t height,
|
||||||
if (old_width != GB_get_screen_width(&gb)) {
|
if (old_width != GB_get_screen_width(&gb)) {
|
||||||
[self.view screenSizeChanged];
|
[self.view screenSizeChanged];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
self.mainWindow.contentMinSize = NSMakeSize(GB_get_screen_width(&gb), GB_get_screen_height(&gb));
|
||||||
|
if (self.mainWindow.contentView.bounds.size.width < GB_get_screen_width(&gb) ||
|
||||||
|
self.mainWindow.contentView.bounds.size.width < GB_get_screen_height(&gb)) {
|
||||||
|
[self.mainWindow zoom:nil];
|
||||||
|
}
|
||||||
|
|
||||||
if ([sender tag] != 0) {
|
if ([sender tag] != 0) {
|
||||||
/* User explictly selected a model, save the preference */
|
/* User explictly selected a model, save the preference */
|
||||||
[[NSUserDefaults standardUserDefaults] setBool:current_model == MODEL_DMG forKey:@"EmulateDMG"];
|
[[NSUserDefaults standardUserDefaults] setBool:current_model == MODEL_DMG forKey:@"EmulateDMG"];
|
||||||
|
|
Loading…
Reference in New Issue