melonDS-emu / melonDS

DS emulator, sorta
https://melonds.kuribo64.net
GNU General Public License v3.0
3.33k stars 544 forks source link

[Feature Request] Displaying each screen to a different window #1449

Open hiddeninthesand opened 2 years ago

hiddeninthesand commented 2 years ago

For those of us with multiple monitors, this would be a preferable way to play games. Having the top screen and bottom screen on different windows would allow you to put both screens on different physical monitors, meaning you don't have to share any of the screen space with any given emulated screen.

dyBBelyBTASTIC commented 2 years ago

This is possible on Windows & Linux by using features outside the emulator. Linux: xrandr Windows: NVIDIA Surround or AMD Eyefinity. MacOS: Use DeSmuME, as it supports this feature for MacOS nativly.

On Windows w/ NVIDIA Cards: NVIDIA Control Panel > Configure Surround, PhysX (Under 3D Settings) > Check mark -> Span displays with Surround This makes both screens work as a single screen spanning both panels (even in exclusive fullscreen)

On Windows w/ AMD Cards: No idea, as i dont have a PC with an AMD card to test, but it should be pretty easy to setup regardless.

Inside MelonDS: Screen Gap: 90px, Screen Layout: Horizontal, Screen Sizing: Even Fullscreen the emulator (by setting a hotkey for exclusive fullscreen) and you get one DS screen centered on each of your panels

/tested with 1920x1080 resolution

JamesYeoman commented 1 year ago

Unfortunately, Nvidia Surround can be quite problematic. It can get itself into a state that prevents you from disabling it. It's fairly inconsistent, because I was able to enable and disable it easily in horizontal mode, but the second I tried vertical mode, it refused to apply any settings changes.

It seems like an untested piece of functionality, or at the very least an underutilised piece of functionality, because I've found reddit posts of people complaining about it refusing to disable, but the traffic on the posts is quite low.

  1. Post from r/techsupport
  2. Post from r/buildapc
  3. Post from r/pcmasterrace

There's another problem with the nvidia surround solution: graphics tablets won't be able to target a single screen for mapping the input area to. Instead, they'll only be able to target the pseudo-screen.

Is there any chance that a split-window mode will be considered? It'd be significantly more reliable than nvidia surround

patataofcourse commented 1 year ago

split window is a planned feature but it requires refactoring of some code which isn't very mantainable rn so its probably gonna take a while

StrikerMan780 commented 1 year ago

Definitely would like such a feature. That way I can put the top screen on my main monitor, and the bottom screen on my pen tablet for touchscreen stuff.

ben401rs commented 1 year ago

indeed and i absolutely agree, just an idea, on my OneX portable pc, the CEMU emulator can rearange the display so that the main monitor is for the game display and the second for the touchpad, its really cool feature

I suppose its not just making the each display into separate windows, im sure its gonna be tricky but worth to add feature to the emulator considering the usecase potential

user18081972 commented 1 year ago

I'm sure theres some hack that allows the emulator to just spawn a second window, and using some desktop-composition feature (atleast in windows) to just draw the output of the main window to the second window, clipping out the coordinates of the bottom display. Kinda like https://github.com/LorenzCK/OnTopReplica does.

nadiaholmquist commented 1 year ago

There might well be a hacky platform-specific way to do it, but to implement it it would need to work on all supported platforms.

StrikerMan780 commented 1 year ago

I don't know if you're using SDL at all, but if you are, you can create as many windows and render contexts as you want in a platform-agnostic way.

andrewkehoe2 commented 1 year ago

This is possible on Windows & Linux by using features outside the emulator. Linux: xrandr

dyBBelyBTASTIC, Can you elaborate on using xrandr for this?

memmam commented 8 months ago

Would really like to see support for this. I have a ROG Ally with a second screen attached, and Eyefinity is unfortunately disabled in the AMD Software and so doesn't even show up as an option. I imagine this is also the case for other similar PC handhelds, like the Lenovo Legion Go, Steam Deck, the various Ayaneo, ONEXPLAYER, GPD, etc handhelds, and I'm not sure if there's even an option for something like Eyefinity or Nvidia Surround from Intel for Arc-based handhelds like the MSI Claw.

memmam commented 8 months ago

Alternatively what would also work in my case would be the ability to fullscreen MelonDS across multiple displays as one window? Not sure how viable that would be.

memmam commented 8 months ago

For anyone else affected by this, I actually found an AutoHotkey script that achieves the effect I'm going for. You can find it here. This works as a stopgap measure until people working on MelonDS have time to implement this functionality natively. :slightly_smiling_face:

stevenbrookslv commented 3 months ago

This would be an EXTREMELY helpful feature

CrashTD commented 2 months ago

That's the one thing that keeps me from using DS emulators in general. This feature would really be extremely helpful.

kenchiichi commented 2 months ago

I was looking to see about this working with the "AYANEO Flip DS", and I just wanted to leave a comment mentioning that I'm looking forward to the future development of this!

SecureB00t commented 1 month ago

DS Fullscreen (Stacked Monitors).txt

I had some issues with the script @memmam linked so I had chatgpt tweak it for use with two monitors arranged vertically. It works perfectly on my machine. You can probably create a shortcut to launch the script with the program and close them both when done, but I'll leave that as an exercise to the reader. (Change file extension to .ahk

AITUS95 commented 3 weeks ago

I made an automated script that might solve your problems: https://github.com/AITUS95/MelonDS-Lime3DS-ScreenManager