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

Screenshot with SDL1 doesn't reflect original colors #727

Open
hihihirokane opened this issue May 20, 2018 · 16 comments
Open

Screenshot with SDL1 doesn't reflect original colors #727

hihihirokane opened this issue May 20, 2018 · 16 comments

Comments

@hihihirokane
Copy link

hihihirokane commented May 20, 2018

This is a screenshot by the BETA (2018-5-18) version built with in-tree SDL1.x on OS X Mountain Lion. White color turns into yellow, green and red interchange their colors, and so on.
dosbox_004
As a reference, a binary built with SDL2 didn't change colors on the screenshot. This may have nothing to do with PC-98 mode because 'machine=svga_s3' also caused this.
dosbox_005

Here is the captured video (converted to GIF):
dosbox_000

@emendelson
Copy link
Contributor

It may be unlikely, but could this problem have anything to do with the various macOS problems in this thread:

https://www.vogons.org/viewtopic.php?f=32&t=54314

@joncampbell123
Copy link
Owner

Right. Mac OS X bitmaps follow a strange RGBA pattern where the alpha channel is in the low 8 bits. I thought I fixed that...

@emendelson
Copy link
Contributor

emendelson commented May 20, 2018

I think it's fixed in the way the macOS displays the screen. I haven't tested with current code, but I think this report is about what happens in a screen shot. Will test later if it's any help.

@joncampbell123
Copy link
Owner

Ah, so the C_SHOT code needs to reverse RGBA again for libpng.

Does this also happen with video capture?

@emendelson
Copy link
Contributor

I hope the OP will report on that - I don't have a current Mac version running, but can build one later on if needed.

@emendelson
Copy link
Contributor

emendelson commented May 20, 2018

OK, I built the latest code, and can't find any way to make a screen shot or record video. The OP says that F12+Shift+S creates a screen shot, but that seems only to enter "S" at the command prompt. And I don't see screen shot or video recording on the mapper menu.

(Also, I think someone already reported that the menu is unresponsive at first to mouse-clicks. I was able to get it to respond but I don't know how - maybe by switching focus to another app and then coming back to DOSBox-X? I though that opening the mapper accomplished this, but it doesn't....)

I used the "build" script to build. Should I try something else?

@hihihirokane
Copy link
Author

I may have configured the mapper myself about screenshot and video. I shouldn't have posted confusing description.

@emendelson
Copy link
Contributor

OK - I'll stay out of this from here on...!

@joncampbell123
Copy link
Owner

@emendelson The screenshot function requires that libz (zlib) and libpng are available to compile against. Are the headers and libraries available on your system when you build?

@emendelson
Copy link
Contributor

Nope - no zlib and libpng headers available here. I may try to figure out how to make them available, but I'm trying to avoid Brew and MacPorts, so it will be a bit tricky. But hihihirokane is clearly better equipped to answer questions about this than I am!

@joncampbell123
Copy link
Owner

I reported the menus are unresponsive to the first click. I had to click on it every compile cycle to check my progress when I was writing the NSMenu support, so having to click away and back to check if I got it right was irritating.

@joncampbell123
Copy link
Owner

@emendelson Try to use Brew and MacPorts if you can.

I may consider modifying configure.ac to compile with the in-tree zlib and libpng if no external library of it is available, just as it does now the SDL2 library.

@emendelson
Copy link
Contributor

emendelson commented May 20, 2018

OK, I used to use MacPorts, but stopped because I kept making apps that wouldn't work on other people's machines (long story). But it would be terrific if you could integrate zlib and libpng into the macOS version. (The only GitHub project of mine that actually works, or used to work, was a script called OneStopDOSBoxOSX that downloads the libraries and runs a build script that uses them; most of that script was based on ideas thought up by Dominus at Vogons.org, but it made it possible to build SVN in macOS with a few clicks.)

@joncampbell123
Copy link
Owner

joncampbell123 commented May 20, 2018

@emendelson It's possible your application linked to the libraries dynamically.

I've learned long ago that on Windows and Mac OS X it's generally easier to either statically link the library into your program or include the DLL or dylib files in your application. Never assume the other systems have it. You make your program more portable that way.

@joncampbell123
Copy link
Owner

Linux is generally an exception because people are more likely to compile from source than run a binary.

@emendelson
Copy link
Contributor

That's exactly what I've learned to do - after a lot of frustrations figuring out how to link statically. Getting that to work with DOSBox SVN on the Mac was a nightmare, and I still don't know how to do it - I simply follow Dominus's method without understanding it, and it works.

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

No branches or pull requests

4 participants