A bit more clang-format
This commit is contained in:
@@ -105,12 +105,13 @@ static const struct {
|
||||
void (*set_fs)(int fs);
|
||||
void (*reload)(void);
|
||||
} vid_apis[RENDERERS_NUM] = {
|
||||
{ "SDL_Software", 1, (int(*)(void*))sdl_inits, sdl_close, NULL, sdl_pause, sdl_enable, sdl_set_fs, sdl_reload },
|
||||
{ "SDL_Hardware", 1, (int(*)(void*))sdl_inith, sdl_close, NULL, sdl_pause, sdl_enable, sdl_set_fs, sdl_reload },
|
||||
{ "SDL_OpenGL", 1, (int(*)(void*))sdl_initho, sdl_close, NULL, sdl_pause, sdl_enable, sdl_set_fs, sdl_reload }
|
||||
,{ "OpenGL_Core", 1, (int(*)(void*))opengl_init, opengl_close, opengl_resize, opengl_pause, NULL, opengl_set_fs, opengl_reload}
|
||||
{ "SDL_Software", 1, (int (*)(void *)) sdl_inits, sdl_close, NULL, sdl_pause, sdl_enable, sdl_set_fs, sdl_reload },
|
||||
{ "SDL_Hardware", 1, (int (*)(void *)) sdl_inith, sdl_close, NULL, sdl_pause, sdl_enable, sdl_set_fs, sdl_reload },
|
||||
{ "SDL_OpenGL", 1, (int (*)(void *)) sdl_initho, sdl_close, NULL, sdl_pause, sdl_enable, sdl_set_fs, sdl_reload },
|
||||
{ "OpenGL_Core", 1, (int (*)(void *)) opengl_init, opengl_close, opengl_resize, opengl_pause, NULL, opengl_set_fs, opengl_reload }
|
||||
#ifdef USE_VNC
|
||||
,{ "VNC", 0, vnc_init, vnc_close, vnc_resize, vnc_pause, NULL, NULL }
|
||||
,
|
||||
{ "VNC", 0, vnc_init, vnc_close, vnc_resize, vnc_pause, NULL, NULL }
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
@@ -25,11 +25,9 @@
|
||||
#include <86box/86box.h>
|
||||
#include <86box/plat_dynld.h>
|
||||
|
||||
|
||||
#ifdef ENABLE_DYNLD_LOG
|
||||
int dynld_do_log = ENABLE_DYNLD_LOG;
|
||||
|
||||
|
||||
static void
|
||||
dynld_log(const char *fmt, ...)
|
||||
{
|
||||
@@ -42,46 +40,44 @@ dynld_log(const char *fmt, ...)
|
||||
}
|
||||
}
|
||||
#else
|
||||
#define dynld_log(fmt, ...)
|
||||
# define dynld_log(fmt, ...)
|
||||
#endif
|
||||
|
||||
|
||||
void *
|
||||
dynld_module(const char *name, dllimp_t *table)
|
||||
{
|
||||
HMODULE h;
|
||||
HMODULE h;
|
||||
dllimp_t *imp;
|
||||
void *func;
|
||||
void *func;
|
||||
|
||||
/* See if we can load the desired module. */
|
||||
if ((h = LoadLibrary(name)) == NULL) {
|
||||
dynld_log("DynLd(\"%s\"): library not found! (%08X)\n", name, GetLastError());
|
||||
return(NULL);
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
/* Now load the desired function pointers. */
|
||||
for (imp=table; imp->name!=NULL; imp++) {
|
||||
for (imp = table; imp->name != NULL; imp++) {
|
||||
func = GetProcAddress(h, imp->name);
|
||||
if (func == NULL) {
|
||||
dynld_log("DynLd(\"%s\"): function '%s' not found! (%08X)\n",
|
||||
name, imp->name, GetLastError());
|
||||
FreeLibrary(h);
|
||||
return(NULL);
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
/* To overcome typing issues.. */
|
||||
*(char **)imp->func = (char *)func;
|
||||
*(char **) imp->func = (char *) func;
|
||||
}
|
||||
|
||||
/* All good. */
|
||||
dynld_log("loaded %s\n", name);
|
||||
return((void *)h);
|
||||
return ((void *) h);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
dynld_close(void *handle)
|
||||
{
|
||||
if (handle != NULL)
|
||||
FreeLibrary((HMODULE)handle);
|
||||
FreeLibrary((HMODULE) handle);
|
||||
}
|
||||
|
||||
@@ -2893,16 +2893,16 @@ win_settings_hard_disks_add_proc(HWND hdlg, UINT message, WPARAM wParam, LPARAM
|
||||
|
||||
for (i = 0; i < 0x3f8; i++)
|
||||
fwrite(&zero, 1, 4, f);
|
||||
} else if (img_format == IMG_FMT_HDX) { /* HDX file */
|
||||
fwrite(&signature, 1, 8, f); /* 00000000: Signature */
|
||||
fwrite(&size, 1, 8, f); /* 00000008: Full size of the data (64-bit) */
|
||||
fwrite(§or_size, 1, 4, f); /* 00000010: Sector size in bytes */
|
||||
fwrite(&spt, 1, 4, f); /* 00000014: Sectors per cylinder */
|
||||
fwrite(&hpc, 1, 4, f); /* 00000018: Heads per cylinder */
|
||||
fwrite(&tracks, 1, 4, f); /* 0000001C: Cylinders */
|
||||
fwrite(&zero, 1, 4, f); /* 00000020: [Translation] Sectors per cylinder */
|
||||
fwrite(&zero, 1, 4, f); /* 00000004: [Translation] Heads per cylinder */
|
||||
} else if (img_format >= IMG_FMT_VHD_FIXED) { /* VHD file */
|
||||
} else if (img_format == IMG_FMT_HDX) { /* HDX file */
|
||||
fwrite(&signature, 1, 8, f); /* 00000000: Signature */
|
||||
fwrite(&size, 1, 8, f); /* 00000008: Full size of the data (64-bit) */
|
||||
fwrite(§or_size, 1, 4, f); /* 00000010: Sector size in bytes */
|
||||
fwrite(&spt, 1, 4, f); /* 00000014: Sectors per cylinder */
|
||||
fwrite(&hpc, 1, 4, f); /* 00000018: Heads per cylinder */
|
||||
fwrite(&tracks, 1, 4, f); /* 0000001C: Cylinders */
|
||||
fwrite(&zero, 1, 4, f); /* 00000020: [Translation] Sectors per cylinder */
|
||||
fwrite(&zero, 1, 4, f); /* 00000004: [Translation] Heads per cylinder */
|
||||
} else if (img_format >= IMG_FMT_VHD_FIXED) { /* VHD file */
|
||||
MVHDGeom _86box_geometry;
|
||||
block_size = settings_get_cur_sel(hdlg, IDC_COMBO_HD_BLOCK_SIZE) == 0 ? MVHD_BLOCK_LARGE : MVHD_BLOCK_SMALL;
|
||||
switch (img_format) {
|
||||
|
||||
@@ -53,8 +53,8 @@
|
||||
#define TIMER_1SEC 1 /* ID of the one-second timer */
|
||||
|
||||
/* Platform Public data, specific. */
|
||||
HWND hwndMain = NULL, /* application main window */
|
||||
hwndRender = NULL, /* machine render window */
|
||||
HWND hwndMain = NULL, /* application main window */
|
||||
hwndRender = NULL, /* machine render window */
|
||||
hwndRender2 = NULL; /* machine second screen render window */
|
||||
HMENU menuMain; /* application main menu */
|
||||
RECT oldclip; /* mouse rect */
|
||||
@@ -300,7 +300,7 @@ ResetAllMenus(void)
|
||||
CheckMenuItem(menuMain, IDM_VID_INVERT, invert_display ? MF_CHECKED : MF_UNCHECKED);
|
||||
|
||||
if (show_second_monitors == 1)
|
||||
CheckMenuItem(menuMain, IDM_VID_MONITORS, MF_CHECKED);
|
||||
CheckMenuItem(menuMain, IDM_VID_MONITORS, MF_CHECKED);
|
||||
|
||||
if (vid_resize == 1)
|
||||
CheckMenuItem(menuMain, IDM_VID_RESIZE, MF_CHECKED);
|
||||
@@ -1380,10 +1380,10 @@ ui_init(int nCmdShow)
|
||||
}
|
||||
|
||||
/* Initialize the configured Video API. */
|
||||
if (! plat_setvid(vid_api)) {
|
||||
if (!plat_setvid(vid_api)) {
|
||||
tdconfig.pszContent = MAKEINTRESOURCE(IDS_2090);
|
||||
TaskDialogIndirect(&tdconfig, NULL, NULL, NULL);
|
||||
return(5);
|
||||
return (5);
|
||||
}
|
||||
|
||||
/* Set up the current window size. */
|
||||
|
||||
Reference in New Issue
Block a user