Jolla C and SDL2

asked 2016-11-11 15:00:25 +0300

hamlatzis gravatar image

I have created a game using SDL2, on my device (first version Jolla) the game works perfectly. It seams that under Jolla C it renders a black screen, that's why it was rejected on the market. I tested it under emulator in all modes (Jolla, JollaC, tablet) and there is no problem.

After sending a Dropbox link for the game to the developer mailing list it was verified that the game runs as sound plays correctly but the screen is black. So I prussume there is a bug on the actual JollaC device, either the SDL2_image library doesn't load correctly the images or the SDL2 doesn't create a full screen window. I use the SDL2_image library only for loading images and the SDL2 library to create the full screen window and handle touch events, all rendering is done with OpenGL ES calls.

Can anyone with JollaC (and maybe a tablet) verify the problem? If needed I could provide a dummy game that just renders a single image but saves a log of every SDL2 and OpenGL ES call and you could share it with us?

edit retag flag offensive close delete

Comments

How about some debug logs first?

tortoisedoc ( 2016-11-11 15:14:03 +0300 )edit

Dummy Game https://www.dropbox.com/s/kgu243fsoh30eke/harbour-dummy-1.0.2-2.armv7hl.rpm?dl=0https://www.dropbox.com/s/tw3if8bcfsj5ldh/harbour-dummy-1.0.2-2.i486.rpm?dl=0

Log file https://www.dropbox.com/sh/fb7y0wjr6srmvhd/AABo9h5CAz6sBkZiPAbxkcH4a?dl=0

The log file will be created under the folder: /home/nemo/.local/share/harbour-dummy/Home/log.txt

In my Jolla device (first generation): As I didn't want to hard code dimension for screen I create a dummy window and query the dimensions later so that I can scale my images

=> 161111:16:59:57 dummy full screen window width 540, height 960

after doing some math for my game I create the actual window for rendering my scaled images

If you download my log you will see that my code is resilient, it works even if some images and/or sounds are missing

hamlatzis ( 2016-11-11 17:15:21 +0300 )edit

I don't have a Jolla C but on the Oneplus X port the dummy game won't launch.

Dylan Van Assche ( 2016-11-11 17:43:14 +0300 )edit

Can you check if the log file has been created? and either share it here or email it to me so that I can debug?

hamlatzis ( 2016-11-11 18:06:23 +0300 )edit

161111:22:40:50 Debug log file: /home/nemo/.local/share/harbour-dummy/Home/log.txt

161111:22:40:50 * Enter main*

161111:22:40:50 Enter CopyFilesIf

161111:22:40:50 file /home/nemo/.local/share/harbour-dummy/Home/cmn.chm exists

161111:22:40:50 Exit CreateLocalFolderIf

161111:22:40:50 Game()

161111:22:40:50 ResourceManager()

161111:22:40:50 GamblingGame()

161111:22:40:50 Before InitGameBeforeOG

161111:22:40:50 Enter GamblingGame::InitGameBeforeOG()

161111:22:40:50 HINT: You should implement CheckHardwareConfigurationLegalityV() in your concrete game class

161111:22:40:50 Exit GamblingGame::InitGameBeforeOG()

161111:22:40:50 After InitGameBeforeOG

161111:22:40:50 After InitGameWhileOG

161111:22:40:50 Enter OGUTInit

161111:22:40:50 audiores = b8652e70

161111:22:40:51 audio resource acquired

161111:22:40:51 Success Mix_OpenAudio

161111:22:40:51 dummy full screen window width 720, height 1280

161111:22:40:51 Actual window created: b8690118

161111:22:40:51 window width 720, height 1280

161111:22:40:51 Success OGUTInit

161111:22:40:51 After OG Init

161111:22:40:51 ResourceManager.AddTexture(): /usr/share/harbour-dummy/Home/Media/Bmps/RouletteScene/Background.png doesn't exist or doesn't have read permisions

161111:22:40:51 ERROR: ResourceManager.AddTexture(): /usr/share/harbour-dummy/Home/Media/Bmps/RouletteScene/Background.png doesn't exist or doesn't have read permisions

161111:22:40:51 ResourceManager.AddTexture(): /usr/share/harbour-dummy/Home/Media/Bmps/bar.png doesn't exist or doesn't have read permisions

161111:22:40:51 ERROR: ResourceManager.AddTexture(): /usr/share/harbour-dummy/Home/Media/Bmps/bar.png doesn't exist or doesn't have read permisions

161111:22:40:51 ResourceManager.AddTexture(): /usr/share/harbour-dummy/Home/Media/Bmps/barMask.png doesn't exist or doesn't have read permisions

161111:22:40:51 ERROR: ResourceManager.AddTexture(): /usr/share/harbour-dummy/Home/Media/Bmps/barMask.png doesn't exist or doesn't have read permisions

161111:22:40:51 Assertion (pObserver!=0) failed in line #21 of file ../FrameWork/GamesGUI/src/Control.cpp

161111:22:40:51 Create controls : /usr/share/harbour-dummy/Home/Media/Layout/Scene2_0_0.txt

161111:22:40:51 construct layout : /usr/share/harbour-dummy/Home/Media/Layout/Scene2_0_0.txt

161111:22:40:51 File: /usr/share/harbour-dummy/Home/Media/Layout/Scene2_0_0.txt - Sections = 1

161111:22:40:51 Section = 0

161111:22:40:51 Section type : 3, name = IMAGE_BACKGROUND

161111:22:40:51 Read IMAGE_TYPE

161111:22:40:51 Enter thread function

161111:22:40:51 Enter DisplayDummyBackground

On AquaFish converted to Jolla C

lal ( 2016-11-11 19:12:04 +0300 )edit