Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
101 user(s) are online (54 user(s) are browsing Forums)

Members: 1
Guests: 100

TheMagicSN, more...

Headlines

 
  Register To Post  

« 1 ... 56 57 58 (59) 60 61 62 ... 72 »
Re: SDL2
Home away from home
Home away from home


See User information
@msteed

Correct.
NumLock doesn't produce a RAWKEY event, but the key itself does with different values.

e.g. (This info is taken from the "learning" mode of AllKeys
NumLock is ON (default), pressing "0" on the numpad gives
$8100000F - RAWKEY - NumPad + 0 and
$8100008F - RAWKEY - NumPad + 0 (upstroke)

while NumLock OFF and pressing "0" gives
$81000047 - RAWKEY - NumPad + Insert and
$8100008F - RAWKEY - NumPad + 0 (upstroke)


So, i think the way to go is to check for the special Codes when numlock is in use and report that instead of a "global" numlock setting.

Not sure how that impacts on performance, but at least it would be something to work with?

@capehill

If you need here are all the RAWKEY combinations from Allkeys for the NumPad keys.

NumLock ON
$8100000F RAWKEY NumPad and
$
8100008F RAWKEY NumPad (upstroke)
$
8100003C RAWKEY NumPad + , and
$
810000BC RAWKEY NumPad + , (upstroke)
$
81000043 RAWKEY NumPad Enter and
$
810000C3 RAWKEY NumPad Enter (upstroke)
$
8100001D RAWKEY NumPad and
$
8100009D RAWKEY NumPad (upstroke)
$
8100001E RAWKEY NumPad and
$
8100009E RAWKEY NumPad (upstroke)
$
8100001F RAWKEY NumPad and
$
8100009F RAWKEY NumPad (upstroke)
$
8100002D RAWKEY NumPad and
$
810000AD RAWKEY NumPad (upstroke)
$
8100002E RAWKEY NumPad and
$
810000AE RAWKEY NumPad (upstroke)
$
8100002F RAWKEY NumPad and
$
810000AF RAWKEY NumPad (upstroke)
$
8100005E RAWKEY NumPad + + and
$
810000DE RAWKEY NumPad + + (upstroke)
$
8100003D RAWKEY NumPad and
$
810000BD RAWKEY NumPad (upstroke)
$
8100003E RAWKEY NumPad and
$
810000BE RAWKEY NumPad (upstroke)
$
8100003F RAWKEY NumPad and
$
810000BF RAWKEY NumPad (upstroke)
$
8100005C RAWKEY NumPad + / and
$
810000DC RAWKEY NumPad + / (upstroke)
$
8100005D RAWKEY NumPad + * and
$
810000DD RAWKEY NumPad + * (upstroke)
$
8100004A RAWKEY NumPad + - and
$
810000CA RAWKEY NumPad + - (upstroke)

NumLock OFF
$81000047 RAWKEY NumPad Insert and
$
8100008F RAWKEY NumPad (upstroke)
$
81000046 RAWKEY NumPad Del , and
$
810000BC RAWKEY NumPad + , (upstroke)
$
81000043 RAWKEY NumPad Enter and
$
810000C3 RAWKEY NumPad Enter (upstroke)
$
81000071 RAWKEY NumPad End and
$
8100009D RAWKEY NumPad (upstroke)
$
8100004D RAWKEY NumPad Cursor Down and
$
8100009E RAWKEY NumPad (upstroke)
$
81000049 RAWKEY NumPad PageDown and
$
8100009F RAWKEY NumPad (upstroke)
$
8100004F RAWKEY NumPad Cursor Left and
$
810000AD RAWKEY NumPad (upstroke)
$
8100002E RAWKEY NumPad and
$
810000AE RAWKEY NumPad (upstroke)
$
8100004E RAWKEY NumPad Cursor Right and
$
810000AF RAWKEY NumPad (upstroke)
$
8100005E RAWKEY NumPad + + and
$
810000DE RAWKEY NumPad + + (upstroke)
$
81000070 RAWKEY NumPad Home and
$
810000BD RAWKEY NumPad (upstroke)
$
8100004C RAWKEY NumPad Cursor Up and
$
810000BE RAWKEY NumPad (upstroke)
$
81000048 RAWKEY NumPad PageUp and
$
810000BF RAWKEY NumPad (upstroke)
$
8100005C RAWKEY NumPad + / and
$
810000DC RAWKEY NumPad + / (upstroke)
$
8100005D RAWKEY NumPad + * and
$
810000DD RAWKEY NumPad + * (upstroke)
$
8100004A RAWKEY NumPad + - and
$
810000CA RAWKEY NumPad + - (upstroke)

Go to top
Re: SDL2
Just can't stay away
Just can't stay away


See User information
@Raziel

Quote:


Quick question...c(w)ould SDL apps benefit from VA (Hardware Video Acceleration)?



I'm not sure what this means in practise, what kind of APIs are provided and so on.

SDL_Renderer API supports YUV textures. "compositing" backend doesn't yet, "opengles2" may work, but I don't remember testing it.

Go to top
Re: SDL2
Home away from home
Home away from home


See User information
@Capehill

Ok, so something for a later date

Thank you

Go to top
Re: SDL2
Just popping in
Just popping in


See User information
@Raziel

Quote:
NumLock doesn't produce a RAWKEY event, but the key itself does with different values.

Ah, I see. You're right, when a numpad key that varies with the NumLock state is pressed, it's possible to deduce the state- if you get a '0' from the numpad then NumLock must be on, and if you get an 'Insert' it must be off.

That won't work with numpad keys like '5' and '+' that don't vary with the NumLock state though, and of course someone has to press a numpad key before you can update the state. That might be good enough, depending on what you're looking to do with the NumLock state, but it's not a general purpose way to know the current state.

Go to top
Re: SDL2
Home away from home
Home away from home


See User information
@Capehill
May i suggest a little thing ?:) : For the release versions remove debug output on serial , as it slow things very much when for example you start opengl/opengles2 apps because of massive output on serial about functions and stuff.

I.e. keep the debug symbols in, but remove serial output fully (for my local builds of SDL2_gl4es i doing that, so it give pretty much better FPS everywhere).

Go to top
Re: SDL2
Just can't stay away
Just can't stay away


See User information
@kas1e

My builds have 2 set of libs, normal libs (.a/.so) that shouldn't have serial debug unless there was some mistake and their _debug variants for developer use. All these are unstripped of debug symbols too.

If you want to build SDL2 without any serial debug, add #undef DEBUG here https://github.com/AmigaPorts/SDL-2.0/ ... igaos4/SDL_os4debug.h#L25

Or did I misunderstand something?

Go to top
Re: SDL2
Home away from home
Home away from home


See User information
@Capehill
Oh yeah, sorry all fine. I just all the time use my own builds from your repo, so didn't noticed that release version all fine. Tested now one from os4depot, and yeah , no debug output and all fast. False alarm :)

Go to top
Re: SDL2
Home away from home
Home away from home


See User information
@Capehill

Did i understand right, that both libSDL2.a and libSDL2_debug.a have debug symbols in, i.e. unstripped ? Just libSDL2.a build without DEBUG output on serial. That correct ?

Because my version of libSDL2.a when i strip symbols and build without debug on serial are 1.2mb , instead of your which is 5mb.

Join us to improve dopus5!
AmigaOS4 on youtube
Go to top
Re: SDL2
Just can't stay away
Just can't stay away


See User information
@kas1e

Yes, everything has debug symbols. My reasoning is that it's more convenient for developers that way. They can strip the final binary in any case.

And serial logs should be enabled only in debug variants.

Finally I'm using GCC 10.2 IIRC, I guess you might be using the newest compiler.

Go to top
Re: SDL2
Home away from home
Home away from home


See User information
@Capehill

Not sure if that related to SDL2, or to OGLES2/GL4ES differenes, but what i noticed now, is when i build ScummVM over GL4ES, and run for example GRIM Fardango game, in the output i have:

Quote:

INFO: OpenGL Red bits: 8
INFO: OpenGL Green bits: 8
INFO: OpenGL Blue bits: 8
INFO: OpenGL Alpha bits: 8
INFO: OpenGL Z buffer depth bits: 24
INFO: OpenGL Double Buffer: 1
INFO: OpenGL Stencil buffer bits: 8


If i build it over ogles2 directly, and run the same game , then while all works as before, output is:

Quote:

OpenGL Red Bits: 0
OpenGL Green Bits: 0
OpenGL Blues Bits: 0
OpenGL Alpha Bits: 0
Z buffer depth bits: 16
Double Buffer: 0
Stencul buffer bits: 8


I asked Scummvm's coder maybe he have a clue, and he said that "We get these values directly from SDL. I don't know why it fails to read. It's either a problem in SDL or OGLES2." Maybe you have an idea about ?

Thanks!

Join us to improve dopus5!
AmigaOS4 on youtube
Go to top
Re: SDL2
Just can't stay away
Just can't stay away


See User information
@kas1e

Please check with glSnoop and try testgles2. Red, green etc should work. GL_DOUBLEBUFFER triggers GL_INVALID_VALUE. It doesn't seem to be supported by OpenGL ES 2.0.

ScummVM doesn't seem to check return values: https://github.com/scummvm/scummvm/blo ... glsdl-graphics3d.cpp#L301

https://wiki.libsdl.org/SDL_GL_GetAttribute

Also setters are not checked: https://github.com/scummvm/scummvm/blo ... penglsdl-graphics.cpp#L48

Go to top
Re: SDL2
Home away from home
Home away from home


See User information
@Capehill
They say that :

Quote:

Yes, the getters are not really important: it's only debug stuff.
For the setters, we try to set things up and if we get a usable context, then, we make use of it.

It's not that clean but it works, so except that you get strange debug information, it's not really a problem. :)


Anyway, now some interesting stuff coming.

If i compile scummvm with usage of FBO, then when i run GRIM Fandango i have that in debug output:

Quote:

OpenGL Red Bits: 0
OpenGL Green Bits: 0
OpenGL Blues Bits: 0
OpenGL Alpha Bits: 0
Z buffer depth bits: 16
Double Buffer: 0
Stencul buffer bits: 8


If i compile scummvm with DISABLED FBO, and run GRIM again, then debug output show me that:

Quote:

INFO: OpenGL Red bits: 8
INFO: OpenGL Green bits: 8
INFO: OpenGL Blue bits: 8
INFO: OpenGL Alpha bits: 8
INFO: OpenGL Z buffer depth bits: 24
INFO: OpenGL Double Buffer: 0
INFO: OpenGL Stencil buffer bits: 8


What did it mean ?

I do test on win32 for sake of test, and there when we with FBO, we even have just that :

Quote:

[2022-04-10 23:15:13] INFO: OpenGL Vendor: ATI Technologies Inc.
[2022-04-10 23:15:13] INFO: OpenGL Renderer: AMD Radeon (TM) R5 M330
[2022-04-10 23:15:13] INFO: OpenGL Version: 4.6.13587 Compatibility Profile Context 20.2.2 26.20.15019.19000
[2022-04-10 23:15:13] INFO: OpenGL Red bits: 0
[2022-04-10 23:15:13] INFO: OpenGL Green bits: 0
[2022-04-10 23:15:13] INFO: OpenGL Blue bits: 0
[2022-04-10 23:15:13] INFO: OpenGL Alpha bits: 0
[2022-04-10 23:15:13] INFO: OpenGL Z buffer depth bits: 0
[2022-04-10 23:15:13] INFO: OpenGL Double Buffer: 1
[2022-04-10 23:15:13] INFO: OpenGL Stencil buffer bits: 0
[2022-04-10 23:15:13] INFO: GLEW Version: 1.12.0
[2022-04-10 23:15:13] INFO: GLSL version: 4.60


So it seems expected that with FBO we have all zeros ..

Join us to improve dopus5!
AmigaOS4 on youtube
Go to top
Re: SDL2
Home away from home
Home away from home


See User information
@Capehill

As far as i can see, we back again to the same old problem called "when we hit alt+enter to swith to full sreen mode, then pure hit on the enter swith it back, while should't, and keys seems keys/mouse stop reacts correctly after". You definately fix it before, as i remember i report it and we do test it till it will works, but seems it back again and at least with scummvm and latest sdl2 build is surely there again.

Also, there seems another issue (not sure if os specific or not):

https://bugs.scummvm.org/ticket/13152

In brief, since some SDL versions, there issue with opengl renderes in scummvm (not sure if it all other platforms, but not win32) : when you swith to fullscreen, then you limited by move the mouse cursor in some square area, not in full screen. As i read its about SDL_SetWindowMouseRect().

Join us to improve dopus5!
AmigaOS4 on youtube
Go to top
Re: SDL2
Just can't stay away
Just can't stay away


See User information
@kas1e

Alt-Enter: do you see "resetting keyboard" on serial? Issue can be on ScummVM side, too, but needs probably more testing with a simpler example.

https://github.com/AmigaPorts/SDL-2.0/ ... aos4/SDL_os4window.c#L770

SDL_SetWindowMouseRect: this function was not implemented on backend, so I wonder where the rectangle could come from? If you can get serial logs, I will take a look.

FBO-related: I don't know why there are differences. GL errors might explain 0 values, but since getters are not checked it remains a mystery without glSnoop logs.

Go to top
Re: SDL2
Home away from home
Home away from home


See User information
@Capehill

FBO-related: harmless in end, just based on the game/drivers/etc, but in no way cause of issues. So we can skip it.

SDL_SetWindowMouseRect: fixed inside of scummvm:
https://github.com/scummvm/scummvm/pull/3826

Alt+Enter issue : i fear its on our side and we need to check this out more carefull. Why i think its on our side: because once i build scummvm with SDL_debug, there is _NO_ such bug. Alt+enter always works as alt+enter, and pure "Enter" never reacts like alt+enter does not matter how offten i swith to/from fullscreen/window. But once i use release version of SDL, then bug is here.

The difference is probabaly dprinf only , which an point us on some fight-for-resoures or something ?

Join us to improve dopus5!
AmigaOS4 on youtube
Go to top
Re: SDL2
Home away from home
Home away from home


See User information
@kas1e

Didn't we have this kind of behaviour in SDL earlier already?
I remember following a thread where this same behaviour was discussed?

People are dying.
Entire ecosystems are collapsing.
We are in the beginning of a mass extinction.
And all you can talk about is money and fairytales of eternal economic growth.
How dare you!
– Greta Thunberg
Go to top
Re: SDL2
Home away from home
Home away from home


See User information
@Raziel
With alt+enter ? Yes, as i wrote in 2 posts above we have it before, and deal with it. But now issue is there again, but what is mystery, is that with SDL2_debug.a there is no such bug, but with pure SDL2.a from the same release archive, issue is there. Meaning that it can be some "fight for resources", where dprintf() auto-fix it in debug build (or just because of some delay, dunno).

Join us to improve dopus5!
AmigaOS4 on youtube
Go to top
Re: SDL2
Just can't stay away
Just can't stay away


See User information
@kas1e

EDIT: reproduced issue, it seems to be caused by combination of SDL_ResetKeyboard and syncing modifier keys during window re-creation.

1) SDL_ResetKeyboard clears ALT bit in "modifiers" table and "soft releases" all pressed keys
2) Sync sets ALT bit on (if still pressed by user)
3) When user releases ALT key for real, event is ignored because it's not considered to change keyboard state (see 1). ALT bit remains enabled and this is problematic
4) User presses enter, this is combined with false ALT bit

It's another thing how to fix it but luckily it was simple to reproduce so it can be debugged freely.


Edited by Capehill on 2022/4/20 19:31:06
Go to top
Re: SDL2
Home away from home
Home away from home


See User information
@Capehill

Nice find, thanks a lot

People are dying.
Entire ecosystems are collapsing.
We are in the beginning of a mass extinction.
And all you can talk about is money and fairytales of eternal economic growth.
How dare you!
– Greta Thunberg
Go to top
Re: SDL2
Home away from home
Home away from home


See User information
@Capehill
Oh good, i was about to recompile DosBOX to test it, thanks for find, that mean 50% of issue gone :)

Btw, but why it works with debug build of SDL2 ?

Join us to improve dopus5!
AmigaOS4 on youtube
Go to top

  Register To Post
« 1 ... 56 57 58 (59) 60 61 62 ... 72 »

 




Currently Active Users Viewing This Thread: 1 ( 0 members and 1 Anonymous Users )




Powered by XOOPS 2.0 © 2001-2023 The XOOPS Project