More newline and whitespace cleanups

This commit is contained in:
Jasmine Iwanek
2022-02-20 02:26:27 -05:00
parent a66e392b26
commit 4674756664
401 changed files with 6985 additions and 6985 deletions

View File

@@ -13,7 +13,7 @@
*
* Copyright 2021 Laci bá'.
*/
#include <windows.h>
#include <windowsx.h>
#include <stdio.h>
@@ -26,15 +26,15 @@
#include <86box/plat.h>
#include <86box/ui.h>
#include <86box/win.h>
HICON hIcon[256]; /* icon data loaded from resources */
char icon_set[256] = ""; /* name of the iconset to be used */
char icon_set[256] = ""; /* name of the iconset to be used */
void win_clear_icon_set()
{
int i;
for (i = 0; i < 256; i++)
for (i = 0; i < 256; i++)
if (hIcon[i] != 0)
{
DestroyIcon(hIcon[i]);
@@ -117,7 +117,7 @@ void win_get_icons_path(char* path_root)
strcpy(roms_root, rom_path);
else
plat_append_filename(roms_root, exe_path, "roms");
plat_append_filename(path_root, roms_root, "icons");
plat_path_slash(path_root);
}
@@ -126,7 +126,7 @@ void win_load_icon_set()
{
win_clear_icon_set();
win_system_icon_set();
if (strlen(icon_set) == 0) {
ToolBarLoadIcons();
return;
@@ -134,28 +134,28 @@ void win_load_icon_set()
char path_root[2048] = {0}, temp[2048] = {0};
wchar_t wtemp[2048] = {0};
win_get_icons_path(path_root);
strcat(path_root, icon_set);
plat_path_slash(path_root);
int i, count = sizeof(icon_files) / sizeof(_ICON_DATA),
x = win_get_system_metrics(SM_CXSMICON, dpi), y = win_get_system_metrics(SM_CYSMICON, dpi);
for (i = 0; i < count; i++)
{
plat_append_filename(temp, path_root, icon_files[i].filename);
mbstoc16s(wtemp, temp, strlen(temp) + 1);
HICON ictemp;
ictemp = LoadImageW(NULL, (LPWSTR)wtemp, IMAGE_ICON, x, y, LR_LOADFROMFILE | LR_DEFAULTCOLOR);
ictemp = LoadImageW(NULL, (LPWSTR)wtemp, IMAGE_ICON, x, y, LR_LOADFROMFILE | LR_DEFAULTCOLOR);
if (ictemp)
{
if (hIcon[icon_files[i].id])
DestroyIcon(hIcon[icon_files[i].id]);
hIcon[icon_files[i].id] = ictemp;
hIcon[icon_files[i].id] = ictemp;
}
}
uint32_t curr_lang = lang_id;
lang_id = 0;
set_language(curr_lang);