Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

macOS 10.14 (Mojave) opengl issues (SDL-1.2) #806

Closed
SDLBugzilla opened this issue Feb 10, 2021 · 0 comments
Closed

macOS 10.14 (Mojave) opengl issues (SDL-1.2) #806

SDLBugzilla opened this issue Feb 10, 2021 · 0 comments

Comments

@SDLBugzilla
Copy link
Collaborator

This bug report was migrated from our old Bugzilla tracker.

These attachments are available in the static archive:

Reported in version: HG 1.2
Reported for operating system, platform: macOS 10.14, All

Comments on the original bug report:

On 2019-09-04 07:59:39 +0000, Ozkan Sezer wrote:

This is from an email John Woo wrote to me:

"Does macos 10.16 still support SDL1.2?
I used SDL to build ffplay. I can hear the sound but
no image when ffplay plays a video. What should I do
to solve this issue?
By the way, updating sdl to sdl2 is very complicated.
Thanks,
Wenjun Wu
code I used to build ffplay: FFmpeg/FFmpeg@c29b532
[...]"
Not working even from mercurial repo SDL-1.2 branch.

When I built the current SDL-1.2 branch against 10.6
SDK using gcc-4.2, it worked OK for him.

As I understand it this is bug # 4272 --
https://discourse.libsdl.org/t/macos-10-14-mojave-issues/25060
i.e. something with Xcode 10 and newer and Mojave and
newer SDKs, which is fixed for 2.0.

Is there a fix for the 1.2 branch?

On 2019-09-11 00:50:02 +0000, Murphy wrote:

I don't build SDL apps on macOS myself, but two recent pieces of code I've written have run into this (or a related Mojave/SDL1.2 blank screen bug) for other users. I thought I'd share what I'd gleaned in case it's helpful.

First, I notice the issue specifies OpenGL. Maybe that's a backend thing I'm not aware of or maybe there are multiple blank screen bugs related to Mojave, but this also occurs with applications that aren't (explicitly, anyway) doing anything with OpenGL.

Second, the solution of building with an old SDK (e.g., the macOS 10.13 SDK from Xcode 10.1) resolves it (though it's a pain).

Third, it looks like this came up in DOSBox-X and Jon Campbell patched the vendored SDL1.2 to fix it (I haven't tested this on my own applications). I'm not sure if there was an attempt to upstream this, but here's the commit and a related issue tracker entry where it's discussed:
joncampbell123/dosbox-x@fdf6061
joncampbell123/dosbox-x#896

Fourth, lending credence to the idea that there may be multiple bugs at play here, some of the Mojave bug reports refer to a black screen, but others are less specific about "no video" or "blank screen" or the like. In the case of my applications, the result isn't black. It's light gray or something (possibly a default window background color?).

On 2019-09-11 10:57:35 +0000, Ozkan Sezer wrote:

Created attachment 3965
mojave updates from dosbox-x

As far as I can see, three additional changes are needed:
joncampbell123/dosbox-x@347ffff
joncampbell123/dosbox-x@53e3ab2
joncampbell123/dosbox-x@2c68314

Attached a diff here for convenience. Those 'TODO's are
a concern, though, it needs thorough review / testing who
knows OSX well.

(Also see: bug # 3303)

On 2020-04-04 22:23:08 +0000, Alex Sirota wrote:

Created attachment 4288
Fix for latest MacOSX versions over latest 1.2 branch

Encountered a similar issue while trying to use/build FCEUX on the latest MacOSX (10.15.4 Catalina) - empty (gray) screens. FCEUX heavily depends on v1.2 (v2 support seems in very initial non-working phases). Got the latest SDL 1.2 branch and patched according to the patches in this ticket (made for DOSBox-X by Jon Campbell). Resulting libraries seems to work and solve the issue. Attaching my diffs/patch - maybe someone would find it useful and/or would want to incorporate into the official legacy code base to support the latest MacOSXs.

On 2020-04-05 15:54:28 +0000, Sam Lantinga wrote:

Patch added, thanks!
https://hg.libsdl.org/SDL/rev/ab7529cb9558

On 2020-06-07 21:11:27 +0000, Ryan Schmidt wrote:

The patch that was committed contains "TODO" and "HACK" comments as well as mismatched whitespace. Will this be cleaned up? I would like to apply this patch in MacPorts so that our Mojave and Catalina users can continue to enjoy libsdl1-based software even before you release version 1.2.16, however our maintainer of libsdl is concerned about the unfinished appearance of the patch.

On 2020-06-08 07:05:14 +0000, Ozkan Sezer wrote:

(In reply to Ryan Schmidt from comment # 5)

The patch that was committed contains "TODO" and "HACK" comments as well as
mismatched whitespace. Will this be cleaned up? I would like to apply this
patch in MacPorts so that our Mojave and Catalina users can continue to
enjoy libsdl1-based software even before you release version 1.2.16,

I don't think that there will be a 1.2.16 release any tine soon.

however
our maintainer of libsdl is concerned about the unfinished appearance of the
patch.

If the unfinished appearance is only because of the whitespace
mismatches, that can be rectified easily: otherwise please tell
us whether the intended functionality is OK.

On 2020-06-08 23:30:23 +0000, Ryan Schmidt wrote:

I don't think that there will be a 1.2.16 release any tine soon.

I certainly don't know what the SDL developers' plans are, but it has been over 8 years since 1.2.15 was released and there have been over 250 commits to the SDL-1.2 branch since then. I have to believe that at least some of those commits have value, such as this one that makes SDL 1.2 work on Mojave and later. It shouldn't be unreasonable to expect or ask developers to timely release new versions of their software so that users and package management systems can update to those versions and benefit from those improvements.

If the unfinished appearance is only because of the whitespace
mismatches, that can be rectified easily: otherwise please tell
us whether the intended functionality is OK.

Our libsdl maintainer expressed concern over the "TODO" comments.

For example there is a block that reads:

if (SDL_VideoSurface->flags & SDL_OPENGLBLIT) {
// TODO
}

macports/macports-ports#7314 (comment)

He didn't mention the "HACK" comments or the whitespace inconsistency, but I noticed them and wanted to point them out as well.

The extent of my testing of the changes is that I was working on updating the game Race Into Space in MacPorts; found an issue on their issue tracker about it not working on Mojave and later; found this SDL bug report and the patch that claimed to fix it; verified that it fixed the issue for me in Mojave and Catalina; and I submitted the PR to get it added to libsdl in MacPorts. I didn't test any other SDL software with this patch, so that hardly constitutes thorough testing. And I've never looked at the SDL source code before, so I wouldn't be qualified to review the patch or make any guarantees about its correctness.

On 2020-06-21 17:51:43 +0000, Ozkan Sezer wrote:

FWIW I tidied up the whitespace: https://hg.libsdl.org/SDL/rev/1d55c02cc513
The changeset now corresponds to the patch from comment # 2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant