From 7386fdc862eb299f1ea99716ff6f76ad17b23817 Mon Sep 17 00:00:00 2001 From: Graham Date: Fri, 9 Aug 2019 19:07:37 +0100 Subject: [PATCH] Improve variable names in jaggl_bootstrap_proc_table --- gl-natives/src/main/c/jaggl.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/gl-natives/src/main/c/jaggl.c b/gl-natives/src/main/c/jaggl.c index 69c195a3..332d4dc3 100644 --- a/gl-natives/src/main/c/jaggl.c +++ b/gl-natives/src/main/c/jaggl.c @@ -228,17 +228,17 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) { } static void jaggl_bootstrap_proc_table(void) { - WNDCLASS c = { + WNDCLASS class = { .lpfnWndProc = DefWindowProc, .hInstance = jaggl_instance, .lpszClassName = "OpenRS2" }; - ATOM class_atom = RegisterClass(&c); + ATOM class_atom = RegisterClass(&class); if (!class_atom) { return; } - HWND hwnd = CreateWindow( + HWND window = CreateWindow( MAKEINTATOM(class_atom), "OpenRS2", 0, @@ -251,12 +251,12 @@ static void jaggl_bootstrap_proc_table(void) { jaggl_instance, NULL ); - if (!hwnd) { + if (!window) { goto destroy_class; } - HDC hdc = GetDC(hwnd); - if (!hdc) { + HDC device = GetDC(window); + if (!device) { goto destroy_window; } @@ -272,33 +272,33 @@ static void jaggl_bootstrap_proc_table(void) { .cDepthBits = 24, .iLayerType = PFD_MAIN_PLANE }; - int format = ChoosePixelFormat(hdc, &pfd); + int format = ChoosePixelFormat(device, &pfd); if (!format) { goto destroy_device; } - if (!SetPixelFormat(hdc, format, &pfd)) { + if (!SetPixelFormat(device, format, &pfd)) { goto destroy_device; } - HGLRC context = wglCreateContext(hdc); + HGLRC context = wglCreateContext(device); if (!context) { goto destroy_device; } - if (!wglMakeCurrent(hdc, context)) { + if (!wglMakeCurrent(device, context)) { goto destroy_context; } jaggl_init_proc_table(); destroy_context: - wglMakeCurrent(hdc, NULL); + wglMakeCurrent(device, NULL); wglDeleteContext(context); destroy_device: - ReleaseDC(hwnd, hdc); + ReleaseDC(window, device); destroy_window: - DestroyWindow(hwnd); + DestroyWindow(window); destroy_class: UnregisterClass(MAKEINTATOM(class_atom), jaggl_instance); }