Merge commit '3a7f96fd99528968c39b5be81db067ca018d432b' into dev

This commit is contained in:
SimoneN64
2024-09-18 20:42:08 +02:00
641 changed files with 31269 additions and 30646 deletions

View File

@@ -75,19 +75,19 @@ static int get_menu_index_by_window(SDL_Window *window)
return -1;
}
static SDL_bool window_is_root(SDL_Window *window)
static bool window_is_root(SDL_Window *window)
{
int i;
for (i = 0; i < state->num_windows; ++i) {
if (window == state->windows[i]) {
return SDL_TRUE;
return true;
}
}
return SDL_FALSE;
return false;
}
static SDL_bool create_popup(struct PopupWindow *new_popup, SDL_bool is_menu)
static bool create_popup(struct PopupWindow *new_popup, bool is_menu)
{
SDL_Window *focus;
SDL_Window *new_win;
@@ -111,11 +111,11 @@ static SDL_bool create_popup(struct PopupWindow *new_popup, SDL_bool is_menu)
new_popup->renderer = new_renderer;
new_popup->parent = focus;
return SDL_TRUE;
return true;
}
SDL_zerop(new_popup);
return SDL_FALSE;
return false;
}
static void close_popups(void)
@@ -167,7 +167,7 @@ static void loop(void)
} else if (event.button.button == SDL_BUTTON_RIGHT) {
/* Create a new popup menu */
menus = SDL_realloc(menus, sizeof(struct PopupWindow) * (num_menus + 1));
if (create_popup(&menus[num_menus], SDL_TRUE)) {
if (create_popup(&menus[num_menus], true)) {
++num_menus;
}
}
@@ -195,7 +195,7 @@ static void loop(void)
/* Show the tooltip if the delay period has elapsed */
if (SDL_GetTicks() > tooltip_timer) {
if (!tooltip.win) {
create_popup(&tooltip, SDL_FALSE);
create_popup(&tooltip, false);
}
}
@@ -248,9 +248,6 @@ int main(int argc, char *argv[])
return 1;
}
/* Enable standard application logging */
SDL_SetLogPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);
/* Parse commandline */
if (!SDLTest_CommonDefaultArgs(state, argc, argv)) {
return 1;