Home  
Login
Username:

Password:

Remember me



Lost Password?

Register now!
Sections
Who's Online
40 user(s) are online (25 user(s) are browsing Forums)

Members: 0
Guests: 40

more...
Support us!
Recent OS4 Files
OS4Depot.net



« 1 ... 10 11 12 (13) 14 15 16 »


Re: SDL2
Just popping in
Joined:
2007/7/14 20:30
From Lothric
Posts: 241
@MickJT

Esc might be a bug. I see game uses:

https://sourceforge.net/p/tuxfootball/ ... e/src/gameengine.cpp#l115

SDL_GetKeyboardState returns array that should be indexed with SDL_ScanCodes. So m_quitKey should be SDL_SCANCODE_ESCAPE.

bad_alloc...can you find out the line?

   Report Go to top

Re: SDL2
Quite a regular
Joined:
2009/4/28 3:57
From Adelaide, Australia
Posts: 810
I don't recall it saying a line number before. It's just a complete system freeze now when I go to "Redefine Keys". No shell output. That's the last testing I can do for a week. The game doesn't take long to port though if you want to grab the git repo and have a look.

Edit: Very quickly rebuilt with SDL_SCANCODE_ESCAPE and now the escape key works. Got the bad_alloc message back now:

terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc

I could edit the source and see exactly where it breaks or freezes, but I don't have the time now, and for a little while.

By the way, are you sure that SDLK_ESCAPE needed to be changed and not an indication of a larger problem? If I recall correctly, checkkeys didn't report the Key Pressed/Released (or maybe it was the "Text:" line it didn't show) when pressing Escape, unlike any other character.

Edit 2: It's the "Text:" line that doesn't show, but it looks like that's probably normal (Cursor Keys & Enter don't show it either). Gotta go now!


Edited by MickJT on 2016/7/16 18:23:37
Edited by MickJT on 2016/7/16 18:25:27
Edited by MickJT on 2016/7/16 18:32:44
   Report Go to top

Re: SDL2
Just popping in
Joined:
2007/7/14 20:30
From Lothric
Posts: 241
@MickJT

Yes, documentation is here https://wiki.libsdl.org/SDL_GetKeyboardState

Checkkeys also reports escape pressed/released. But what it should report for text?

Regarding bad_alloc, it's also game issue that it doesn't try-catch the error. However, we have to debug why allocation failed.

   Report Go to top

Re: SDL2
Just popping in
Joined:
2007/7/14 20:30
From Lothric
Posts: 241
r135 is supposed to merge 2.0.4 modifications into our branch. Patch was 7 megabytes (pain) so I expect there to be new issues.

One obvious problem is that .so is not generated at the moment. As a workaround, remove -no-undefined from generated makefile (libtool's flag). Hopefully we could get rid of pthreads dependency with SDL2.

Testautomation seems to give some failures and there are probably some unimplemented backend functions but they will be added later.


   Report Go to top

Re: SDL2
Not too shy to talk
Joined:
2006/11/22 17:57
From Italy, Rome
Posts: 474
@Capehill


Great!

Hope to try soon.

_________________
Retired
   Report Go to top

Re: SDL2
Home away from home
Joined:
2006/11/26 21:45
From A haunted Castle somewhere in the Bavarian Mountains
Posts: 2854
@Capehill

Here you are, found another game that has the "shift to the right" issue

Mystery House SDL1 Correct Alignment
Resized Image

Mystery House SDL2 Shifted Alignment
Resized Image
(PuTTy log)
[OS4_WarpMouseWarping mouse to 542118
[OS4_WarpMouseBuilding event structure
[OS4_WarpMouseFire!
[
OS4_WarpMouseDone
[OS4_DestroyRendererFreeing renderer bitmap 0x450A29A8
[OS4_SetDisplayModeDesktop mode passed
[OS4_SetWindowFullscreenTrying to set 'Hi-Res Adventure #1: Mystery House (Apple II/English)' into window mode
[OS4_SetWindowFullscreenWindow 'Hi-Res Adventure #1: Mystery House (Apple II/English)' is being destroyedmode change ignored
[OS4_WarpMouseWarping mouse to 542116
[OS4_WarpMouseBuilding event structure
[OS4_WarpMouseFire!
[
OS4_WarpMouseDone
[OS4_HideWindowCalled
[OS4_GetDisplayBoundsx=0y=0w=2560h=1440
[OS4_SetWindowGrabInternalWindow 0x4B01CBC0 ('Hi-Res Adventure #1: Mystery House (Apple II/English)'input was released
[OS4_ShowCursorHiding cursor
[OS4_SetPointerForEachWindowSetting pointer object/type 0x4B01F2A4/16 for window 0x4B01CBC0
[OS4_DestroyWindowCalled for 'Hi-Res Adventure #1: Mystery House (Apple II/English)' (flags 0xB)
[
OS4_CloseWindowInternalClosing window 'Hi-Res Adventure #1: Mystery House (Apple II/English)'
[OS4_CloseScreenInternalClose screen 0x4B01A590
[OS4_GL_FreeBuffersCalled
[OS4_GL_UnloadLibraryCalled
[OS4_GetDisplayBoundsx=0y=0w=2560h=1440
[OS4_GL_LoadLibraryCalled 0
[OS4_GetDisplayBoundsx=0y=0w=2560h=1440
[OS4_CreateWindowOpen fullscreen window with delay
[OS4_ShowWindowCalled
[OS4_RaiseWindowCalled
[OS4_GetDisplayBoundsx=0y=0w=2560h=1440
[OS4_GetDisplayBoundsx=0y=0w=2560h=1440
[OS4_GetDisplayBoundsx=0y=0w=2560h=1440
[OS4_SetDisplayModeOpening screen id 1342182144640*480*24
[OS4_SetWindowFullscreenTrying to set 'Hi-Res Adventure #1: Mystery House (Apple II/English)' into fullscreen mode
[OS4_SetWindowFullscreenSystem window doesn't exist yet, let's open it
[OS4_GetIDCMPFlagsCalled
[OS4_GetWindowFlagsCalled
[OS4_GetScreenForWindowFullscreen
[OS4_CreateWindowInternalTrying to open window 'Hi-Res Adventure #1: Mystery House (Apple II/English)' at (1000,528of size (560x384)
[
OS4_CreateRendererCreating renderer for 'Hi-Res Adventure #1: Mystery House (Apple II/English)' (flags 0x0)
[
OS4_CreateRendererVSYNCoff
[OS4_ActivateRendererAllocating VRAM bitmap 640*480*32 for renderer
[OS4_UpdateClipRectCliprect: (0,0) - 640*480
[OS4_GetOutputSizew=640h=480
[OS4_SetWindowGrabInternalWindow 0x4B01CBC0 ('(null)'input was released
[OS4_WindowEventCalled with event 12



The Kite SDL1 Correct Alignment
Resized Image

The Kite SDL2 Shifted Alignment
Resized Image
(PuTTy log)
[OS4_DestroyRendererFreeing renderer bitmap 0x2D200478
[OS4_SetDisplayModeDesktop mode passed
[OS4_SetWindowFullscreenTrying to set 'The Kite (Version 1.3.e/Windows/English)' into window mode
[OS4_SetWindowFullscreenWindow 'The Kite (Version 1.3.e/Windows/English)' is being destroyedmode change ignored
[OS4_WarpMouseWarping mouse to 264255
[OS4_WarpMouseBuilding event structure
[OS4_WarpMouseFire!
[
OS4_WarpMouseDone
[OS4_HideWindowCalled
[OS4_GetDisplayBoundsx=0y=0w=2560h=1440
[OS4_SetWindowGrabInternalWindow 0x4F60F108 ('The Kite (Version 1.3.e/Windows/English)'input was released
[OS4_ShowCursorHiding cursor
[OS4_SetPointerForEachWindowSetting pointer object/type 0x46721C74/16 for window 0x4F60F108
[OS4_DestroyWindowCalled for 'The Kite (Version 1.3.e/Windows/English)' (flags 0xB)
[
OS4_CloseWindowInternalClosing window 'The Kite (Version 1.3.e/Windows/English)'
[OS4_CloseScreenInternalClose screen 0x4671F758
[OS4_GL_FreeBuffersCalled
[OS4_GL_UnloadLibraryCalled
[OS4_GetDisplayBoundsx=0y=0w=2560h=1440
[OS4_GL_LoadLibraryCalled 0
[OS4_GetDisplayBoundsx=0y=0w=2560h=1440
[OS4_CreateWindowOpen fullscreen window with delay
[OS4_ShowWindowCalled
[OS4_RaiseWindowCalled
[OS4_GetDisplayBoundsx=0y=0w=2560h=1440
[OS4_GetDisplayBoundsx=0y=0w=2560h=1440
[OS4_GetDisplayBoundsx=0y=0w=2560h=1440
[OS4_SetDisplayModeOpening screen id 1342313216800*600*24
[OS4_SetWindowFullscreenTrying to set 'The Kite (Version 1.3.e/Windows/English)' into fullscreen mode
[OS4_SetWindowFullscreenSystem window doesn't exist yet, let's open it
[OS4_GetIDCMPFlagsCalled
[OS4_GetWindowFlagsCalled
[OS4_GetScreenForWindowFullscreen
[OS4_CreateWindowInternalTrying to open window 'The Kite (Version 1.3.e/Windows/English)' at (880,420of size (800x600)
[
OS4_CreateRendererCreating renderer for 'The Kite (Version 1.3.e/Windows/English)' (flags 0x0)
[
OS4_CreateRendererVSYNCoff
[OS4_ActivateRendererAllocating VRAM bitmap 800*600*32 for renderer
[OS4_UpdateClipRectCliprect: (0,0) - 800*600
[OS4_GetOutputSizew=832h=600
[OS4_UpdateViewportCliprect: (0,0) - 832*600
[OS4_DestroyRendererFreeing renderer bitmap 0x46743EB8
[OS4_SetDisplayModeDesktop mode passed
[OS4_SetWindowFullscreenTrying to set 'The Kite (Version 1.3.e/Windows/English)' into window mode
[OS4_SetWindowFullscreenWindow 'The Kite (Version 1.3.e/Windows/English)' is being destroyedmode change ignored
[OS4_HideWindowCalled
[OS4_GetDisplayBoundsx=0y=0w=2560h=1440
[OS4_DestroyWindowCalled for 'The Kite (Version 1.3.e/Windows/English)' (flags 0xB)
[
OS4_CloseWindowInternalClosing window '(null)'
[OS4_CloseScreenInternalClose screen 0x4671F758
[OS4_GL_FreeBuffersCalled
[OS4_GL_UnloadLibraryCalled
[OS4_GetDisplayBoundsx=0y=0w=2560h=1440
[OS4_GL_LoadLibraryCalled 0
[OS4_GetDisplayBoundsx=0y=0w=2560h=1440
[OS4_CreateWindowOpen fullscreen window with delay
[OS4_ShowWindowCalled
[OS4_RaiseWindowCalled
[OS4_GetDisplayBoundsx=0y=0w=2560h=1440
[OS4_GetDisplayBoundsx=0y=0w=2560h=1440
[OS4_GetDisplayBoundsx=0y=0w=2560h=1440
[OS4_SetDisplayModeOpening screen id 13424442881280*720*24
Gronk
...
[
OS4_SetWindowFullscreenTrying to set 'The Kite (Version 1.3.e/Windows/English)' into fullscreen mode
[OS4_SetWindowFullscreenSystem window doesn't exist yet, let's open it
[OS4_GetIDCMPFlagsCalled
[OS4_GetWindowFlagsCalled
[OS4_GetScreenForWindowFullscreen
[OS4_CreateWindowInternalTrying to open window 'The Kite (Version 1.3.e/Windows/English)' at (727,370of size (1105x700)
[
OS4_CreateRendererCreating renderer for 'The Kite (Version 1.3.e/Windows/English)' (flags 0x0)
[
OS4_CreateRendererVSYNCoff
[OS4_ActivateRendererAllocating VRAM bitmap 1280*720*32 for renderer
[OS4_UpdateClipRectCliprect: (0,0) - 1280*720
[OS4_GetOutputSizew=1280h=720
[OS4_SetWindowGrabInternalWindow 0x4F60F8E8 ('(null)'input was released
[OS4_WindowEventCalled with event 12


Edited by Raziel on 2016/11/8 7:31:19
_________________
If slaughterhouses had glass walls, everyone would be a vegetarian. ~ Sir Paul McCartney
-
Did everything just taste purple for a second? ~ Philip J. Fry
-
Ain't got no cash, ain't got no style, ladies vomit when I smile. ~ Dr. John Zoidberg
   Report Go to top

Re: SDL2
Just popping in
Joined:
2007/7/14 20:30
From Lothric
Posts: 241
@Raziel

Thanks for log. How much shift you get? Any chance for a screenshot? Did you say it doesn't happen always?

   Report Go to top

Re: SDL2
Home away from home
Joined:
2006/11/26 21:45
From A haunted Castle somewhere in the Bavarian Mountains
Posts: 2854
@Capehill

I updated the post above to show what the difference is.

I found another one and probably will find even more games with this issue

It happens every time with at least the two games mentioned above.

In the other thread where i said it didn't happen anymore i was using the SDL1 build for testing

_________________
If slaughterhouses had glass walls, everyone would be a vegetarian. ~ Sir Paul McCartney
-
Did everything just taste purple for a second? ~ Philip J. Fry
-
Ain't got no cash, ain't got no style, ladies vomit when I smile. ~ Dr. John Zoidberg
   Report Go to top

Re: SDL2
Just popping in
Joined:
2007/7/14 20:30
From Lothric
Posts: 241
@Raziel

Finally checked those logs. It looks like SDL2 opens a new screen but when window is created, it uses some strange x/y coordinates for position (would have expected 0,0). I have to do some fullscreen tests.

   Report Go to top

Re: SDL2
Home away from home
Joined:
2006/11/26 21:45
From A haunted Castle somewhere in the Bavarian Mountains
Posts: 2854
@Capehill

Thanks a lot

_________________
If slaughterhouses had glass walls, everyone would be a vegetarian. ~ Sir Paul McCartney
-
Did everything just taste purple for a second? ~ Philip J. Fry
-
Ain't got no cash, ain't got no style, ladies vomit when I smile. ~ Dr. John Zoidberg
   Report Go to top

Re: SDL2
Just popping in
Joined:
2007/7/14 20:30
From Lothric
Posts: 241
@Raziel

When programmer passes SDL_WINDOWPOS_CENTERED parameter, SDL2 most likely uses the information of the first stored display, which on our system is probably your Workbench screen. Then it calculates new window coordinates based on the dimensions of your WB screen, which might not match the application's expectations...that explains funny readings in the serial log.

For now, it looks as if the most simplest solution would be to ignore SDL2's window centering code and center the window on AmigaOS backend side. This solution needs a bit more testing before commit.

As a workaround, you can try to pass X=0, Y=0 for your window.

   Report Go to top

Re: SDL2
Home away from home
Joined:
2006/11/26 21:45
From A haunted Castle somewhere in the Bavarian Mountains
Posts: 2854
@Capehill

I wouldn't know how to do that...i can't code

_________________
If slaughterhouses had glass walls, everyone would be a vegetarian. ~ Sir Paul McCartney
-
Did everything just taste purple for a second? ~ Philip J. Fry
-
Ain't got no cash, ain't got no style, ladies vomit when I smile. ~ Dr. John Zoidberg
   Report Go to top

Re: SDL2
Just popping in
Joined:
2007/7/14 20:30
From Lothric
Posts: 241
@Raziel

Here https://wiki.libsdl.org/SDL_CreateWindow

Try locating that function call from your game code and replace x and y parameters with zeroes.

Alternately please compile r139 and tell me if problem still there..

   Report Go to top

Re: SDL2
Home away from home
Joined:
2006/11/26 21:45
From A haunted Castle somewhere in the Bavarian Mountains
Posts: 2854
@Capehill

Thank you

The in source change to 0, 0 made the game screen start at, of course, 0, 0

But there are still important portions cut off as you can see in the picture
Resized Image

I haven't tried building SDL2 myself as i wouldn't know how to properly create libraries, i leave that to the pros to not stir up any more dust when reporting errors i made myself on the way of building sdl2

_________________
If slaughterhouses had glass walls, everyone would be a vegetarian. ~ Sir Paul McCartney
-
Did everything just taste purple for a second? ~ Philip J. Fry
-
Ain't got no cash, ain't got no style, ladies vomit when I smile. ~ Dr. John Zoidberg
   Report Go to top

Re: SDL2
Just popping in
Joined:
2007/7/14 20:30
From Lothric
Posts: 241
@Raziel

Looking at the earlier serial log, we can observe that window width was less than 640. I am not sure why is that, did game want it or did SDL2 screw it somehow?

Please, if you have time, try compiling r139. I know that Davide can build SDL2 without issues, for example. It should work, unless your SDK is somehow broken. (ok, .so build is currently broken, it's a known issue)

I hope we could have another SDL2 release this year, but there are still some open issues.

   Report Go to top

Re: SDL2
Not too shy to talk
Joined:
2006/11/22 17:57
From Italy, Rome
Posts: 474
@Capehill

I will compile R139 asap.


_________________
Retired
   Report Go to top

Re: SDL2
Not too shy to talk
Joined:
2006/11/22 17:57
From Italy, Rome
Posts: 474
@thread


Capehill released version 164.

Works very well.

Can't wait to have a system opengles2 compatible to test.


Don't forget to support the projects.

_________________
Retired
   Report Go to top

Re: SDL2
Home away from home
Joined:
2006/12/2 3:55
From Italy, Perugia
Posts: 2971
@AmigaBlitter

Released where ?
Officially still the old r119 on Sourceforge, atleast you mentioned the progressing internal version to compile

   Report Go to top

Re: SDL2
Not too shy to talk
Joined:
2006/11/22 17:57
From Italy, Rome
Posts: 474
On sourceforce there is R164.
Tomorrow will be on os4depot, i guess.


_________________
Retired
   Report Go to top

Re: SDL2
Home away from home
Joined:
2006/11/26 21:45
From A haunted Castle somewhere in the Bavarian Mountains
Posts: 2854
@samo79

Guess he was talking about the code revision in trunk.

There wasn't a build released for some time now

_________________
If slaughterhouses had glass walls, everyone would be a vegetarian. ~ Sir Paul McCartney
-
Did everything just taste purple for a second? ~ Philip J. Fry
-
Ain't got no cash, ain't got no style, ladies vomit when I smile. ~ Dr. John Zoidberg
   Report Go to top


« 1 ... 10 11 12 (13) 14 15 16 »



[Advanced Search]


Powered by XOOPS 2.0 © 2001-2016 The XOOPS Project