Fixed (SDL2) Fullscreen splits over multiple monitors

Status
Not open for further replies.

Metal96

Member
Hello again,

Well, I'm not quite certain what all the hype about SDL2 is for, as for me, that newfangled build is completely unusable. Here's a short list of my qualms:

  1. Framerate is terrible everywhere. The game tells me I'm getting a full 35, but it comes to me as if the damn thing were running on an N64.
  2. Sound is terrible everywhere. Every single thing the game pumps out of my speakers is a choppy mess that appears to be irregularly oscillating between sound and silence about 10-20 times a second if it even plays the sound at all (or less—it gets worse if more than one sound is playing, e.g. the amount of silence almost doubles if I jump, and adding sound effects on top of that irregularly compounds this).
  3. Fullscreen splits over my two monitors, rather than confining itself to the main display as the DirectDraw (dd?) build does. This would be almost passable if the resolution of both displays together was available for my choosing, but it is not, and even then, having a big monitor bezel in the way doesn't help the already failing playability issues.

There must be something terribly wrong with my machine if this new library is truly a godsend. I'm running Win7 x64 on an AMD Athlon X4 (3.4GHz) with 8GB DDR3 and an AMD Radeon HD 7800 (860MHz w/ 1GB DDR5)—all neatly pressed onto an MSi MS-7721 mainboard with an integrated Realtek HD Audio chip—coming to me via two DELL 1703FP monitors (1280x1024). The system's never given me trouble (outside of the normal Windows bullshit, of course).

EDIT: Here's a video of SDL2 doing its thing, taken on a phone for neutrality (you see what I see).
 
Last edited by a moderator:
TRIPLE MONITOR SUPPORT CONFIRMED

The framerate is probably bad because AMD is awful at supporting OpenGL. On top of that, your CPU is pretty severely bottlenecking your GPU. What resolution are you running the game at? Can you turn off multi-monitor and try it again?

I am amazed that the sound problems are happening. I have a feeling it has to do with Windows and Athlon processor scheduling, but that's just me throwing ideas out in the wind. I'm going to peruse the LibSDL mailing list and see if anyone else has had problems like this.

I didn't expect the splitting issue to happen though. THAT is hilarious. I'll have to look into a better solution for fullscreen if I can't tell SDL to use one monitor for the window. Added to my Trello board.
 
>framerate & sound
I figured it was an issue with AMD. anyway, I FIXED IT YAY

Kinda.

Okay. So I loaded the game in windowed and it ran fine. No sound glitches, no N64 framerate, pure, smooth, silky SDL2. Then I tried it in fullscreen, and...it worked fine. Still the split, but that's addressed below. Wondering what the hell was going on, I realized that I "Show Desktop"'d beforehand to minimize everything. "Well, I bet it's desktop compositing screwing this up!" I thought to myself. I brought up every minimized window, and, lo and behold, in both windowed and fullscreen (because fullscreen now is just a big version of windowed but more on that later) there was choppy sound and half the framerate (almost like the screen and sound were updating at the same time...?). So it's desktop compositing's fault. Now I'm gonna go right into fullscreen and tie the two together later. So now, as you know, the split occurs because the fullscreen now does not "take over" the system as it used to (and as a lot (but not all) of fullscreen games do). Now it's just a big window that fills the desktop, and it sticks SRB2 in the middle of that window as big as it can given the resolution. But if the desktop takes two monitors, the window will still fill the desktop (thus filling the two monitors) and then stick SRB2 in the middle of that—right between them. YouTube, WMP, and the like (all "casually fullscreen) do the exact same thing. If SDL2 supports "takeover" fullscreen, I think you could just put it as a very optional option for those of us with this issue (now or in the future). That way Win8+ users could run it with the new, better-for-that-sort-of-thing fullscreen, and those with hackjobs running Win98 or whatever could simply change a "no" to a "yes" and magically have our outdated fullscreen method back. This would also fix the framerate issue, as it would force-off compositing, putting the GPU in this "exclusive" mode that I know nothing about (being a web developer mainly, I only know the "big ideas" behind how all this stuff works as I don't really deal with the low level of the graphics/sound side of things), thus fixing every problem at once. Desktop compositing is the only issue, and if you can force SDL2 into "exclusive" mode, all the problems I think would be solved.

Then again, what do I know?

EDIT: Okay, forget all of that. I just ran it again to test and 320x200 with everything minimized had super-choppy music and was unplayable. I then disabled desktop composition, and it got marginally better—no framerate issues and faster-chopping music (and the intro loaded!) This has become an inconsistent bug—the worst kind.
 
Last edited:
Fullscreen being split across all displays is fixed on my local branch, as well as several minor issues.

I say AMD might be a problem because there are known processor scheduling issues in Windows when using AMD processors.

I chose specifically to not use exclusive fullscreen because it introduces a lot of problems on platforms that don't handle mode changing well (read: all of them except Windows 8). It should have no bearing on the game's performance, and it helps people who like to alt-tab. I may consider re-adding it as an option in the future, though.

Unfortunately the sound issues are going to be very hard to debug without having a computer of my own suffering from them. You're not the only one who's reported it, but it's very rare and I have no way of debugging it remotely.
 
Metal96, for your sound problems. Try messing with the cpuaffinity command and see if it helps.
 
I just set it to all four cores rather than just the first. How do I make it stick, is the question.
 
Ah. Well thanks, that seems to fix everything! I'll still be using DirectDraw until that fullscreen hooha is released, though. However, perhaps including/forcing "0" (use all CPUs) as the default value would be a good idea...
 
Status
Not open for further replies.

Who is viewing this thread (Total: 1, Members: 0, Guests: 1)

Back
Top