Use C++ style comments consistently in SDL source code

Implemented using this script:

find . -type f -exec sed -i'' -e 's,/\* *\([^*]*\)\*/ *$,// \1,' -e 's, \+$,,' {} \;
git checkout \
    core/linux/SDL_evdev_kbd_default_keymap.h \
    events/imKStoUCS.* \
    hidapi \
    joystick/controller_type.c \
    joystick/controller_type.h \
    joystick/hidapi/steam/controller_constants.h \
    joystick/hidapi/steam/controller_structs.h \
    joystick/SDL_gamepad_db.h \
    libm \
    render/*/*Shader*.h \
    render/vitagxm/SDL_render_vita_gxm_shaders.h \
    render/metal/SDL_shaders_metal_*.h \
    stdlib/SDL_malloc.c \
    stdlib/SDL_qsort.c \
    stdlib/SDL_strtokr.c \
    test/ \
    video/directx/SDL_d3d12_xbox_cmacros.h \
    video/directx/d3d12.h \
    video/directx/d3d12sdklayers.h \
    video/khronos \
    video/x11/edid-parse.c \
    video/x11/xsettings-client.* \
    video/yuv2rgb
sed -i'' -e 's,/\* *\([^*]*\)\*/ *$,// \1,' -e 's, \+$,,' hidapi/SDL_hidapi.c
This commit is contained in:
Sam Lantinga
2024-08-22 10:30:45 -07:00
parent 658fc3db0f
commit 6501e90018
743 changed files with 11882 additions and 11882 deletions

View File

@@ -37,7 +37,7 @@ HANDLE plmSuspendComplete = nullptr;
extern "C"
int SDL_GetGDKTaskQueue(XTaskQueueHandle *outTaskQueue)
{
/* If this is the first call, first create the global task queue. */
// If this is the first call, first create the global task queue.
if (!GDK_GlobalTaskQueue) {
HRESULT hr;
@@ -48,10 +48,10 @@ int SDL_GetGDKTaskQueue(XTaskQueueHandle *outTaskQueue)
return SDL_SetError("[GDK] Could not create global task queue");
}
/* The initial call gets the non-duplicated handle so they can clean it up */
// The initial call gets the non-duplicated handle so they can clean it up
*outTaskQueue = GDK_GlobalTaskQueue;
} else {
/* Duplicate the global task queue handle into outTaskQueue */
// Duplicate the global task queue handle into outTaskQueue
if (FAILED(XTaskQueueDuplicateHandle(GDK_GlobalTaskQueue, outTaskQueue))) {
return SDL_SetError("[GDK] Unable to acquire global task queue");
}
@@ -67,7 +67,7 @@ void GDK_DispatchTaskQueue(void)
* This gives the option to opt-out for those who want to handle everything themselves.
*/
if (GDK_GlobalTaskQueue) {
/* Dispatch any callbacks which are ready. */
// Dispatch any callbacks which are ready.
while (XTaskQueueDispatch(GDK_GlobalTaskQueue, XTaskQueuePort::Completion, 0))
;
}
@@ -76,7 +76,7 @@ void GDK_DispatchTaskQueue(void)
extern "C"
int GDK_RegisterChangeNotifications(void)
{
/* Register suspend/resume handling */
// Register suspend/resume handling
plmSuspendComplete = CreateEventEx(nullptr, nullptr, 0, EVENT_MODIFY_STATE | SYNCHRONIZE);
if (!plmSuspendComplete) {
SDL_SetError("[GDK] Unable to create plmSuspendComplete event");
@@ -102,7 +102,7 @@ int GDK_RegisterChangeNotifications(void)
return -1;
}
/* Register constrain/unconstrain handling */
// Register constrain/unconstrain handling
auto raccn = [](BOOLEAN constrained, PVOID context) {
SDL_LogDebug(SDL_LOG_CATEGORY_APPLICATION, "[GDK] in RegisterAppConstrainedChangeNotification handler");
SDL_VideoDevice *_this = SDL_GetVideoDevice();
@@ -125,11 +125,11 @@ int GDK_RegisterChangeNotifications(void)
extern "C"
void GDK_UnregisterChangeNotifications(void)
{
/* Unregister suspend/resume handling */
// Unregister suspend/resume handling
UnregisterAppStateChangeNotification(hPLM);
CloseHandle(plmSuspendComplete);
/* Unregister constrain/unconstrain handling */
// Unregister constrain/unconstrain handling
UnregisterAppConstrainedChangeNotification(hCPLM);
}