Skip to content

Bittboy support#6

Open
szymor wants to merge 2 commits intozear:masterfrom
szymor:master
Open

Bittboy support#6
szymor wants to merge 2 commits intozear:masterfrom
szymor:master

Conversation

@szymor
Copy link

@szymor szymor commented Aug 24, 2019

Makefile changes and minor screen drawing tweak to avoid screen tearing on Bittboy, it should not affect other platforms.

void draw()
{
clearScreen();
//clearScreen();
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't leave commented out code like that.
It appears that clearScreen() has become redundant, as in both STATE_TITLE and STATE_GAME the whole screen area gets repainted with drawBackground() anyway, so we can safely remove this call from the code.
But how does it fix tearing on your platform?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bittboy does not have vsync and apparently the screen is being cleared directly after clearScreen() call. This is a probable reason of black horizontal bars showing in random positions on the screen. After removing that call, screen tearing is not visible to that extent and becomes acceptable (at least for me). Lack of vsync is a known issue on Bittboy.

STRIP := arm-linux-strip
SYSROOT := $(shell $(CC) --print-sysroot)
CFLAGS := $(shell $(SYSROOT)/usr/bin/sdl-config --cflags)
CFLAGS += -DSCREEN_SCALE=1
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move this change to the previous commit, as it is unrelated to the tearing fix.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feel free to move it around.

SCALE 1

# Display mode. Value: 0 - windowed, 1 - fullscreen
FULLSCREEN 0
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no need to include a default game config, as the game will generate one on the fly if it doesn't find an existing one.
The same goes about the default score file.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had some issues with those and got Segmentation Fault on Bittboy. Not sure if it was the reason as I made other changes as well, but for completeness I have put defaults in there. Feel free to remove them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants