MantisBT - Zandronum
View Issue Details
0002420Zandronum[All Projects] Suggestionpublic2015-08-28 22:512016-02-29 21:45
Monsterovich 
 
normalminoralways
needs reviewopen 
Linux, I guessAny
3.0-beta 
 
0002420: SDL implementation of alt+enter, alt+f4 and alt+tab
This is my attempt to add these very useful controls. (windows has them by default!!!) I'd be happy to see them in the future zandronum versions if it's possible.

'https://bitbucket.org/Monsterovich/zandronum-new/commits/043027152a2409c59372b3c779b663e2107dba39 [^]'
No tags attached.
Issue History
2015-08-28 22:51MonsterovichNew Issue
2015-11-15 16:01Torr SamahoNote Added: 0013807
2015-11-15 16:01Torr SamahoAssigned To => Torr Samaho
2015-11-15 16:01Torr SamahoStatusnew => feedback
2015-11-16 14:31MonsterovichNote Added: 0013824
2015-11-16 14:31MonsterovichStatusfeedback => assigned
2015-11-16 14:33MonsterovichNote Edited: 0013824bug_revision_view_page.php?bugnote_id=13824#r8230
2015-11-16 14:38MonsterovichNote Edited: 0013824bug_revision_view_page.php?bugnote_id=13824#r8231
2015-11-16 22:37MonsterovichNote Edited: 0013824bug_revision_view_page.php?bugnote_id=13824#r8232
2016-02-06 01:22DuskNote Added: 0014327
2016-02-08 23:29MonsterovichNote Added: 0014395
2016-02-08 23:37MonsterovichNote Added: 0014396
2016-02-09 07:05Torr SamahoNote Added: 0014398
2016-02-09 10:06MonsterovichNote Added: 0014399
2016-02-09 11:18MonsterovichNote Added: 0014400
2016-02-09 11:20MonsterovichNote Edited: 0014400bug_revision_view_page.php?bugnote_id=14400#r8689
2016-02-09 11:30MonsterovichNote Edited: 0014399bug_revision_view_page.php?bugnote_id=14399#r8691
2016-02-09 14:58MonsterovichNote Edited: 0014400bug_revision_view_page.php?bugnote_id=14400#r8692
2016-02-09 15:02MonsterovichNote Edited: 0014399bug_revision_view_page.php?bugnote_id=14399#r8693
2016-02-09 16:28MonsterovichNote Edited: 0014400bug_revision_view_page.php?bugnote_id=14400#r8697
2016-02-09 16:53MonsterovichNote Edited: 0014400bug_revision_view_page.php?bugnote_id=14400#r8698
2016-02-09 16:54MonsterovichNote Edited: 0014400bug_revision_view_page.php?bugnote_id=14400#r8699
2016-02-09 17:53DuskNote Added: 0014403
2016-02-09 17:53DuskAssigned ToTorr Samaho =>
2016-02-09 17:53DuskStatusassigned => new
2016-02-09 18:35Torr SamahoNote Added: 0014404
2016-02-10 10:14MonsterovichNote Added: 0014407
2016-02-10 10:15MonsterovichNote Edited: 0014407bug_revision_view_page.php?bugnote_id=14407#r8707
2016-02-10 10:19MonsterovichNote Edited: 0014407bug_revision_view_page.php?bugnote_id=14407#r8708
2016-02-21 21:19Torr SamahoNote Added: 0014470
2016-02-21 22:35MonsterovichNote Added: 0014472
2016-02-21 22:37MonsterovichNote Edited: 0014472bug_revision_view_page.php?bugnote_id=14472#r8755
2016-02-21 22:39MonsterovichNote Edited: 0014472bug_revision_view_page.php?bugnote_id=14472#r8756
2016-02-22 00:44StrikerMan780Note Added: 0014473
2016-02-23 09:51MonsterovichNote Added: 0014478
2016-02-23 10:01DuskNote Added: 0014479
2016-02-23 22:06MonsterovichNote Added: 0014483
2016-02-23 22:07MonsterovichNote Edited: 0014483bug_revision_view_page.php?bugnote_id=14483#r8760
2016-02-23 22:25DuskNote Added: 0014486
2016-02-23 22:26DuskNote Edited: 0014486bug_revision_view_page.php?bugnote_id=14486#r8762
2016-02-24 13:18MonsterovichNote Added: 0014489
2016-02-24 13:25MonsterovichNote Edited: 0014489bug_revision_view_page.php?bugnote_id=14489#r8764
2016-02-24 18:12MonsterovichNote Edited: 0014489bug_revision_view_page.php?bugnote_id=14489#r8765
2016-02-24 19:16Edward-sanNote Added: 0014492
2016-02-25 13:57MonsterovichNote Added: 0014494
2016-02-25 14:20DuskNote Added: 0014495
2016-02-25 14:21DuskStatusnew => needs review
2016-02-28 21:51Torr SamahoNote Added: 0014517
2016-02-28 21:53Torr SamahoNote Edited: 0014517bug_revision_view_page.php?bugnote_id=14517#r8790
2016-02-29 21:45MonsterovichNote Added: 0014519

Notes
(0013807)
Torr Samaho   
2015-11-15 16:01   
Would you mind posting a pull request for ZDoom with this? If ZDoom adds it, I can backport it to 3.0.
(0013824)
Monsterovich   
2015-11-16 14:31   
(edited on: 2015-11-16 22:37)
It's not possible, because the last zdoom revision has SDL 2.0 instead of 1.2 that already works with these controls.
The problem is that SDL 2.0 uses fake fullscreen which makes these controls possible in Xorg, but it slows peformance down VERY VERY bad. See this'http://postimg.ru/img/2015-11/16/3nhak2wirhrycpf9a1fzg0p9i.png [^]' screenshot. I guess, we should stay at 1.2, because "new" doesn't always mean "better". I just added these controls for 1.2 like it is made in other games. (e.x. quake1-3 engine based games are using sdl 1.2)

So, what should I do?

(0014327)
Dusk   
2016-02-06 01:22   
And you're sure that you didn't just have cl_capfps on?
(0014395)
Monsterovich   
2016-02-08 23:29   
Eh. I tried to change that cvar already and I still have low fps in zdoom 2.8, this is an obvious SDL 2.0 issue. The new fullscreen is a true sort of crap. I "enjoyed" it.
(0014396)
Monsterovich   
2016-02-08 23:37   
This issue also happened with Doomsday and Alienarena (quake3 engine game) when they upgraded SDL to 2.0. Now it lags very hard in both.
(0014398)
Torr Samaho   
2016-02-09 07:05   
Did you report the issue at the ZDoom forum? According to the release log of ZDoom 2.8, they consider the move to SDL 2 to be a major improvement.
(0014399)
Monsterovich   
2016-02-09 10:06   
(edited on: 2016-02-09 15:02)
Quote
Did you report the issue at the ZDoom forum?


to get answers like...
Your CPU is just slow. Buy a new PC!

I may try, but I predict their reaction to things like "%s works bad in zdoom". Especially, if no one cares about linux users.

Quote
According to the release log of ZDoom 2.8, they consider the move to SDL 2 to be a major improvement.


According to the zdoom code, they just replaced 1.2 functions with 2.0, nothing more. There were no special reasons to move to SDL 2.0. May be it's because 2 > 1.

I have to learn more info about SDL 2.0, but it seems like they just removed normal fullscreen. It's very bad.

(0014400)
Monsterovich   
2016-02-09 11:18   
(edited on: 2016-02-09 16:54)
UPDATE: In zdoom 2.8 they forced users to use SDL_WINDOW_FULLSCREEN_DESKTOP instead SDL_WINDOW_FULLSCREEN. I tried SDL_WINDOW_FULLSCREEN with "cl_capfps false" So..

- It works a bit faster, but I still have 60-65 fps vs 120 in zandronum. I don't like this "improvement".
- It's fake fullscreen anyway. Yes, SDL devs removed normal fullscreen.
- Alt+tab works (randomly) worse than in my patch for SDL1.2.
- Alt+enter is not working at all.
- And this'http://postimg.ru/img/2016-02/09/pmbjs6y9d1725bwjone27o3bs.jpg [^]' happens everytime.

I don't want to discuss this SDL 2.0 drama here, please stay at SDL 1.2 where everything works fine.

EDIT:
'http://forum.zdoom.org/viewtopic.php?f=1&t=50712&p=883540#p883540 [^]'

(0014403)
Dusk   
2016-02-09 17:53   
This kind of really is your own fault for not reporting. Now you see, for 4.0 we'll likely upgrade to 2.8 which upgrades to SDL to 2.0.

So even if your patch was added we'd have to revert it anyway, so I'm tempted to just close this now.
(0014404)
Torr Samaho   
2016-02-09 18:35   
Quote from Monsterovich
I don't want to discuss this SDL 2.0 drama here, please stay at SDL 1.2 where everything works fine.

Unfortunately, we can't do both stay faithful to ZDoom in terms of modding features and pile up delta for things where we don't like what ZDoom is doing. Since the majority of users wants us to follow ZDoom, we'll have to switch to SDL 2.0 eventually.

If switching from SDL 1.2 to 2.0 has such a drastic drawback, you should be able to convince the ZDoom devs to look for a solution. It goes without saying that you need to report this in a level-headed manner. Accusations won't get you anywhere.
(0014407)
Monsterovich   
2016-02-10 10:14   
(edited on: 2016-02-10 10:19)
Quote
Since the majority of users wants us to follow ZDoom


No. These people just want to get more USEFUL features in the future versions. That's all. This doesn't mean that you should backport every crap from zdoom.

Quote
we'll have to switch to SDL 2.0 eventually.


When they merge something in (g)zdoom, they don't even check the code quality, but you should do that. I know about this since my friend wrote SWGL for GZDoom.

Quote
you should be able to convince the ZDoom devs to look for a solution


This is like talking with Graf Zahl about quake demos. It makes no sense.

(0014470)
Torr Samaho   
2016-02-21 21:19   
Quote from Monsterovich

No. These people just want to get more USEFUL features in the future versions. That's all. This doesn't mean that you should backport every crap from zdoom.

We can't cherry pick the ZDoom changes. This will get unmaintainable.

Can you provide some reference that confirms that SDL 2 only has "fake fullscreen", like you called it earlier?
(0014472)
Monsterovich   
2016-02-21 22:35   
(edited on: 2016-02-21 22:39)
Quote
Can you provide some reference that confirms that SDL 2 only has "fake fullscreen", like you called it earlier?


SDL wiki says that SDL_WINDOW_FULLSCREEN should work like "real" fullscreen, but actually it don't. It changes the screen resolution, but it works like SDL_WINDOW_FULLSCREEN_DESKTOP. My previous screenshot shows this:'http://postimg.ru/img/2016-02/09/pmbjs6y9d1725bwjone27o3bs.jpg. [^]' SDL_WINDOW_FULLSCREEN allows to draw everything behind the fullscreen window.

Unlike SDL2 SDL1 in fullscreen mode eats all input on linux, but it works much faster than new. Plus you can write the custom controls for Alt+Tab and Alt+Enter like I did.
I can't do anything to SDL2. The fullscreen code is already integrated in it and it's bugged. (see screenshot ^^^)

SDL always was a mess.

(0014473)
StrikerMan780   
2016-02-22 00:44   
Moving to SDL2 even if they just remapped the current functions is good not just because of something dumb like 2 > 1. SDL2 handles a lot of shit better than SDL1, and is oftentimes less buggy overall.
(0014478)
Monsterovich   
2016-02-23 09:51   
Quote
SDL2 handles a lot of shit better than SDL1, and is oftentimes less buggy overall.


I have more issues with SDL2 than with SDL1.
(0014479)
Dusk   
2016-02-23 10:01   
We still need to decide what to do with the patch. We could apply it for Zandronum 3.0, and revert it for 4.0's SDL2 upgrade, or we could reject it now and close this ticket.
(0014483)
Monsterovich   
2016-02-23 22:06   
(edited on: 2016-02-23 22:07)
Quote
SDL2 upgrade


Yes, this "upgrade".
Seriously, why don't you understand that SDL2 just broke everything?

You may merge my patch right now.

(0014486)
Dusk   
2016-02-23 22:25   
(edited on: 2016-02-23 22:26)
If SDL2 broke everything, then why does it work just fine for me and everybody else? You only have yourself to blame for not reporting this in time.

In fact, you can still take this to ZDoom if you're civil about it. Who knows, maybe a backportable fix can be made.

(0014489)
Monsterovich   
2016-02-24 13:18   
(edited on: 2016-02-24 18:12)
Quote
then why does it work just fine for me and everybody else?


Quote
everybody


Who are these people? There are only 2.5 people who are playing zandro on linux. It just can't work for everybody.

SDL2 vs SDL1
It's like you had 300 fps, and now you have 150.
It works smoothly too, but it's not the same.
I have 120 fps with SDL1 and I got 50-60 with SDL2. I see the difference.

Quote
In fact, you can still take this to ZDoom if you're civil about it.


"Monsterovich is an idiot. WON'T FIX." Actually, they don't care.

(0014492)
Edward-san   
2016-02-24 19:16   
Quote from Monsterovich
"Monsterovich is an idiot. WON'T FIX." Actually, they don't care.


With no proof, your story goes poof.
(0014494)
Monsterovich   
2016-02-25 13:57   
Quote
With no proof, your story goes poof.


This issue is still not fixed. That's proof.
(0014495)
Dusk   
2016-02-25 14:20   
Alright, enough of this argument. It's clear you cannot be reasoned with. Torr can add this patch if he wants it, and revert it for 4.0. That's all there is to here now.
(0014517)
Torr Samaho   
2016-02-28 21:51   
(edited on: 2016-02-28 21:53)
Quote from Monsterovich

SDL wiki says that SDL_WINDOW_FULLSCREEN should work like "real" fullscreen, but actually it don't. It changes the screen resolution, but it works like SDL_WINDOW_FULLSCREEN_DESKTOP. My previous screenshot shows this:http://postimg.ru/img/2016-02/09/pmbjs6y9d1725bwjone27o3bs.jpg. [^] SDL_WINDOW_FULLSCREEN allows to draw everything behind the fullscreen window.

Did you ask the SDL devs about this? It's hard to believe that SDL2 is as bad as you claim.

(0014519)
Monsterovich   
2016-02-29 21:45   
Quote

Did you ask the SDL devs about this?


I can do that, but it works obviously like I said in my previous post.

Quote
It's hard to believe that SDL2 is as bad as you claim.


I believed when some games moved to SDL2.