Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android background color #95

Merged
merged 1 commit into from
Mar 8, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions render.c
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,12 @@ void draw_rectangle(struct draw_rectangle_command *command) {
background_color.g = command->color.g;
background_color.b = command->color.b;
background_color.a = 0xFF;

#ifdef __ANDROID__
int bgcolor = (command->color.r << 16) |
(command->color.g << 8) | command->color.b;
SDL_AndroidSendMessage(0x8001, bgcolor);
#endif
}

SDL_SetRenderDrawColor(rend, command->color.r, command->color.g,
Expand Down