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

Improve Multi Monitor support #405

Merged
merged 10 commits into from
Jan 11, 2018
Merged

Improve Multi Monitor support #405

merged 10 commits into from
Jan 11, 2018

Conversation

mbalfour
Copy link
Contributor

@mbalfour mbalfour commented Jan 6, 2018

A couple of improvements to the MultiMon plugin:

  1. Added x/y/width/height controls for the artwork. Useful if you're trying to place artwork at the top of a monitor instead of centered. (For example, for a dedicated marquee monitor)
  2. Force cross-fades to complete when launching a game.

Add configurable size & placement for artwork.
Ensure cross-fade completes when entering game.
Change the MultiMon config labels to have 1-based monitor numbers
instead of 0-based.
Split transition into two functions for better readability.
Remove the clear so that multi-monitor artwork can remain during launch.
@mbalfour
Copy link
Contributor Author

mbalfour commented Jan 6, 2018

Note: The one potentially controversial change here is the removal of win->clear() in fe_window.cpp. Please let me know if that needs to become configurable in some way, or if there's a better way to handle this. Basically, the problem is that I would like the marquee artwork to remain on-screen for my second monitor even while the emulator is running. Since AttractMode is effectively paused during launch, I don't see a way to keep updating the display list. So instead, by removing the clear from the wait callback (which only executes while the emulator is launched), the existing display continues to be drawn until we return. I don't know if this has any negative ramifications in any other use cases or platforms, but it works fine for me on Windows.

Fix crash for NES romlist parsing.  For files ending in .nes, the
buff_ptr pointer gets modified, which caused the delete to be incorrect.
@mbalfour
Copy link
Contributor Author

mbalfour commented Jan 6, 2018

Just discovered/fixed a crash when Generating Romlist with .nes files. A pointer was getting changed which caused a bad delete [] call.

@mickelson
Copy link
Owner

Thanks for this! A couple of comments/requests:

  • in the change to src/fe_window.cpp, did you try removing the call to win->display() as well? I think the call to win->display() should be removed as well, if it still works for you without it.

  • please amend the pull request to remove the attract.exe and *.ipch binary files and the vs.json files completely. I'd rather not have a bunch of binary files polluting the git history.

cheers

mbalfour and others added 5 commits January 8, 2018 08:01
@mbalfour
Copy link
Contributor Author

mbalfour commented Jan 8, 2018

Good point, removed win->display(), it still works without it. The other files were completely accidental, I've removed them, sorry about that.

@mickelson mickelson merged commit ce0a087 into mickelson:master Jan 11, 2018
@mickelson
Copy link
Owner

Ok merged, thanks!

@smashthehack
Copy link

hi mickelson , i use win 10 and msys2 mingw to compile attract.exe, but encounter an error "fatal error: FML/Config.hpp: No such file or directory #include <SFML/Config.hpp>"

what is the solution? i have identic problem of mbalfour. do you want to compile the program for me?

@mbalfour
Copy link
Contributor Author

If it's the same problem, the fix was released in 2.3. You shouldn't need to compile it yourself unless you're trying to pick up other fixes.

@oomek
Copy link
Collaborator

oomek commented May 10, 2018

I've managed to identify the cause of backbuffer blinking while launchig mame. It does not happen on every setup that's why is difficult to debug. It does not happen on Nvidia cards, but it does on Radeon with Freesync monitor for example.

Removal of the lines below from fe_window.cpp is the culprit:

        win->clear(); 
        win->display(); 

The window modes affected are Fullscreen and Borderless. I’m not using Fillscreen as it has a terrible performance(layouts are unable to maintaon 60fps on artwork loading)

Is there any particular reason you have decided that in needs to be deleted?
Update: I read your post from above and I understand and I’m offering a solution below.

@oomek
Copy link
Collaborator

oomek commented May 10, 2018

If it only applies to the multimonitor configuration I would suggest to skip those lines only if the window mode is set to fill screen

@oomek
Copy link
Collaborator

oomek commented May 10, 2018

I could add it back with some conditionals to my pull request with recent fixes. I would like to close this chapter already, as I’ve been trying to figure out how to fix those stale frames leaking through on emu launch/exit for the last month or so. Today I’ve noticed that 2.3.0 does not have that issue, so I started disecting all the commits since 2.3.0 release and I found your crime :)

@oomek
Copy link
Collaborator

oomek commented May 11, 2018

Fixed in: 804d0c1

@mbalfour
Copy link
Contributor Author

mbalfour commented May 15, 2018 via email

@oomek
Copy link
Collaborator

oomek commented May 15, 2018

My commit disables clearing the screen buffer only when Multi monitor option is set to on and the screen mode is set to Fill Screen which is the only properly working set of modes to have Multimonitor working properly. If you have any other suggestion, feel free to post.

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

Successfully merging this pull request may close these issues.

4 participants