Odd full screen behavior in version 2.5 (7 Feb '21)

About SheepShaver, a PPC Mac emulator for Windows, MacOS X, and Linux that can run System 7.5.3 to MacOS 9.0.4.

Moderators: Cat_7, Ronald P. Regensburg, ClockWise

User avatar
Ronald P. Regensburg
Expert User
Posts: 6673
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Re: Odd full screen behavior in version 2.5 (7 Feb '21)

Post by Ronald P. Regensburg »

adespoton wrote: Fri Feb 12, 2021 5:51 pmWhat would be nice is a hybrid binary that checks if Metal/Metal 2 is available and can fail backwards... but I'm not sure where SDL2 is at with that feature right now.
Is there any way for an application to check if Metal/Metal 2 is available? Then SheepShaver and BasiliskII could be made to use Metal only when available and if available use it by default.
kanjitalk755
Mac Mechanic
Posts: 179
Joined: Thu Nov 09, 2017 12:06 pm

Re: Odd full screen behavior in version 2.5 (7 Feb '21)

Post by kanjitalk755 »

In SDL 2.0.12, it was automatically judged in the library.
However, SDL 2.0.14 adds a new flag to use Metal when creating a window, which must be specified manually.
It seems that it can only be determined whether Metal can be used after the window is created.
It's a strange specification...
User avatar
adespoton
Forum All-Star
Posts: 3312
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: Odd full screen behavior in version 2.5 (7 Feb '21)

Post by adespoton »

kanjitalk755 wrote: Sun Feb 14, 2021 12:30 am In SDL 2.0.12, it was automatically judged in the library.
However, SDL 2.0.14 adds a new flag to use Metal when creating a window, which must be specified manually.
It seems that it can only be determined whether Metal can be used after the window is created.
It's a strange specification...
Isn't there an API provided by the OS that lets you query Metal capabilities? You could check that during application initialization and then set the Metal flag prior to creating the window.

https://developer.apple.com/documentati ... e_versions should provide the info needed.
kanjitalk755
Mac Mechanic
Posts: 179
Joined: Thu Nov 09, 2017 12:06 pm

Re: Odd full screen behavior in version 2.5 (7 Feb '21)

Post by kanjitalk755 »

Implemented the function to automatically set the window flag depending on whether Metal device is available.

https://github.com/kanjitalk755/macemu/ ... ullscreen3
User avatar
Ronald P. Regensburg
Expert User
Posts: 6673
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Re: Odd full screen behavior in version 2.5 (7 Feb '21)

Post by Ronald P. Regensburg »

New builds with this latest solution:

SheepShaver: https://www.emaculation.com/sheepshaver ... test_3.zip
BasiliskII: https://www.emaculation.com/basilisk/Ba ... test_3.zip

Tested on my Late 2013 iMac with macOS 10.15.7
(I have no non-metal machine available for testing.)

Launching fullscreen works fine and smoothly for both BasiliskII and SheepShaver.
User avatar
adespoton
Forum All-Star
Posts: 3312
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: Odd full screen behavior in version 2.5 (7 Feb '21)

Post by adespoton »

Tested on my late 2015 running 11.2.1, works fine in windowed and fullscreen. Will test later on El Cap on a non-Metal 2008 and see what happens (info.plist does state min requirements of 10.7).
User avatar
Ronald P. Regensburg
Expert User
Posts: 6673
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Re: Odd full screen behavior in version 2.5 (7 Feb '21)

Post by Ronald P. Regensburg »

adespoton wrote: Sun Feb 14, 2021 7:18 pmWill test later on El Cap on a non-Metal 2008 and see what happens
Did you have the opportunity yet?

Or maybe someone else who can test the latest test_3 builds on a non-Metal Mac?
almeath
Granny Smith
Posts: 119
Joined: Mon Jul 18, 2005 5:42 am
Location: Australia

Re: Odd full screen behavior in version 2.5 (7 Feb '21)

Post by almeath »

Ronald P. Regensburg wrote: Sat Feb 20, 2021 11:47 am Or maybe someone else who can test the latest test_3 builds on a non-Metal Mac?
Tested SheepShaver on a late 2008 MacBook (MacBook5,1) running El Capitan 10.11.6.

It works, but exhibits the bouncing menu bar as described in my initial post. As would be expected, it ignores the setting "sdlrender metal" and otherwise runs normally.
User avatar
Ronald P. Regensburg
Expert User
Posts: 6673
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Re: Odd full screen behavior in version 2.5 (7 Feb '21)

Post by Ronald P. Regensburg »

Expected behaviour with SDL2 2.0.16 on a non-Metal Mac, any Mac that was introduced earlier than late 2012.

As this issue is really minor, a cosmetic issue that will last no longer than one second, during full-screen launch only, and only on Macs that are at least 8 years old, I think this change can be merged with the master branch.
almeath
Granny Smith
Posts: 119
Joined: Mon Jul 18, 2005 5:42 am
Location: Australia

Re: Odd full screen behavior in version 2.5 (7 Feb '21)

Post by almeath »

Ronald P. Regensburg wrote: Mon Feb 22, 2021 12:24 pm As this issue is really minor, a cosmetic issue that will last no longer than one second, during full-screen launch only, and only on Macs that are at least 8 years old, I think this change can be merged with the master branch.
It lasts a second on my i9 iMac, and about 4 seconds on the 2008 Core 2 Duo MacBook, but I agree that it is a minor issue, which will become increasingly less significant as older Macs drop off the perch.
kanjitalk755
Mac Mechanic
Posts: 179
Joined: Thu Nov 09, 2017 12:06 pm

Re: Odd full screen behavior in version 2.5 (7 Feb '21)

Post by kanjitalk755 »

I merged test_fullscreen3 branch to the master.
User avatar
Ronald P. Regensburg
Expert User
Posts: 6673
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Re: Odd full screen behavior in version 2.5 (7 Feb '21)

Post by Ronald P. Regensburg »

I will post new notarized builds of SheepShaver and BasiliskII in the coming days.
kanjitalk755
Mac Mechanic
Posts: 179
Joined: Thu Nov 09, 2017 12:06 pm

Re: Odd full screen behavior in version 2.5 (7 Feb '21)

Post by kanjitalk755 »

On non-Metal Mac, you may be able to improve the startup behavior by setting the following in ~/.sheepshaver_prefs.

Code: Select all

sdlrender opengl
User avatar
Ronald P. Regensburg
Expert User
Posts: 6673
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Re: Odd full screen behavior in version 2.5 (7 Feb '21)

Post by Ronald P. Regensburg »

I cannot test this on my Metal Mac. Is it already implemented in the builds I created yesterday?

Maybe someone (almeath?) can confirm this on a non-Metal Mac?

If it works, could it also be implemented such that it will automatically use this when the check for Metal device is negative?
kanjitalk755
Mac Mechanic
Posts: 179
Joined: Thu Nov 09, 2017 12:06 pm

Re: Odd full screen behavior in version 2.5 (7 Feb '21)

Post by kanjitalk755 »

I don't think there are any side effects, so I implemented it.
User avatar
Ronald P. Regensburg
Expert User
Posts: 6673
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Re: Odd full screen behavior in version 2.5 (7 Feb '21)

Post by Ronald P. Regensburg »

I will again make new builds later this week.
almeath
Granny Smith
Posts: 119
Joined: Mon Jul 18, 2005 5:42 am
Location: Australia

Re: Odd full screen behavior in version 2.5 (7 Feb '21)

Post by almeath »

kanjitalk755 wrote: Sun Feb 28, 2021 9:59 am I don't think there are any side effects, so I implemented it.
Yes, it works fine on my non-Metal MacBook. With the opengl setting it behaves basically the same as the Metal-enabled iMac with the metal setting. The menu flashes so quick you can barely notice it, literally a fraction of a second.
User avatar
Ronald P. Regensburg
Expert User
Posts: 6673
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Re: Odd full screen behavior in version 2.5 (7 Feb '21)

Post by Ronald P. Regensburg »

With builds from the latest source, the additional opengl setting should not be needed anymore. I sent links to these builds in a PM for testing.
almeath
Granny Smith
Posts: 119
Joined: Mon Jul 18, 2005 5:42 am
Location: Australia

Re: Odd full screen behavior in version 2.5 (7 Feb '21)

Post by almeath »

I tested without the sdl preference setting, and yes, it does work the same on each Mac. Thanks to everyone who worked on this. :smile:
User avatar
Ronald P. Regensburg
Expert User
Posts: 6673
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Re: Odd full screen behavior in version 2.5 (7 Feb '21)

Post by Ronald P. Regensburg »

Good! Thanks for testing.
I will post the new (March 1st) builds later today.
User avatar
Ronald P. Regensburg
Expert User
Posts: 6673
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Re: Odd full screen behavior in version 2.5 (7 Feb '21)

Post by Ronald P. Regensburg »

And thank you kanjitalk755 !
Post Reply