diff --git a/test/testffmpeg_vulkan.c b/test/testffmpeg_vulkan.c index 5ffaf589f..36d69dd61 100644 --- a/test/testffmpeg_vulkan.c +++ b/test/testffmpeg_vulkan.c @@ -91,11 +91,11 @@ struct VulkanVideoContext VulkanDeviceFeatures features; - PFN_vkGetInstanceProcAddr vkGetInstanceProcAddr; + PFN_vkGetInstanceProcAddr vkGetInstanceProcAddr; #define VULKAN_GLOBAL_FUNCTION(name) PFN_##name name; #define VULKAN_INSTANCE_FUNCTION(name) PFN_##name name; #define VULKAN_DEVICE_FUNCTION(name) PFN_##name name; - VULKAN_FUNCTIONS() + VULKAN_FUNCTIONS() #undef VULKAN_GLOBAL_FUNCTION #undef VULKAN_INSTANCE_FUNCTION #undef VULKAN_DEVICE_FUNCTION @@ -440,7 +440,7 @@ static int findPhysicalDevice(VulkanVideoContext *context) if (!context->physicalDevice) { return SDL_SetError("Vulkan: no viable physical devices found"); } - return 0; + return 0; } static void initDeviceFeatures(VulkanDeviceFeatures *features) @@ -649,24 +649,24 @@ done: if (result != VK_SUCCESS) { return -1; } - return 0; + return 0; } VulkanVideoContext *CreateVulkanVideoContext(SDL_Window *window) { - VulkanVideoContext *context = SDL_calloc(1, sizeof(*context)); - if (!context) { - return NULL; - } + VulkanVideoContext *context = SDL_calloc(1, sizeof(*context)); + if (!context) { + return NULL; + } if (loadGlobalFunctions(context) < 0 || createInstance(context) < 0 || createSurface(context, window) < 0 || findPhysicalDevice(context) < 0 || createDevice(context) < 0) { - DestroyVulkanVideoContext(context); - return NULL; - } - return context; + DestroyVulkanVideoContext(context); + return NULL; + } + return context; } void SetupVulkanRenderProperties(VulkanVideoContext *context, SDL_PropertiesID props) diff --git a/test/testpen.c b/test/testpen.c index 5804ebd6e..94c676606 100644 --- a/test/testpen.c +++ b/test/testpen.c @@ -75,32 +75,32 @@ static void DrawScreen(SDL_Renderer *renderer) SDL_SetRenderDrawColor(renderer, 0xa0, 0xa0, 0xa0, 0xff); if (last_touching) { - SDL_FRect rect; + SDL_FRect rect; rect.x = 0; rect.y = 0; rect.w = 2.0f * X - 1.0f; rect.h = 2.0f * Y - 1.0f; - SDL_RenderRect(renderer, &rect); + SDL_RenderRect(renderer, &rect); } else { - /* Show where the pen is rotating when it isn't touching the surface. - Otherwise we draw the rotation angle below together with pressure information. */ - float rot_vecx = SDL_sinf(last_rotation / 180.0f * SDL_PI_F); - float rot_vecy = -SDL_cosf(last_rotation / 180.0f * SDL_PI_F); - float px = X + rot_vecx * 100.0f; - float py = Y + rot_vecy * 100.0f; - float px2 = X + rot_vecx * 80.0f; - float py2 = Y + rot_vecy * 80.0f; + /* Show where the pen is rotating when it isn't touching the surface. + Otherwise we draw the rotation angle below together with pressure information. */ + float rot_vecx = SDL_sinf(last_rotation / 180.0f * SDL_PI_F); + float rot_vecy = -SDL_cosf(last_rotation / 180.0f * SDL_PI_F); + float px = X + rot_vecx * 100.0f; + float py = Y + rot_vecy * 100.0f; + float px2 = X + rot_vecx * 80.0f; + float py2 = Y + rot_vecy * 80.0f; - SDL_RenderLine(renderer, - px, py, - px2 + rot_vecy * 20.0f, - py2 - rot_vecx * 20.0f); - SDL_RenderLine(renderer, - px, py, - px2 - rot_vecy * 20.0f, - py2 + rot_vecx * 20.0f); + SDL_RenderLine(renderer, + px, py, + px2 + rot_vecy * 20.0f, + py2 - rot_vecx * 20.0f); + SDL_RenderLine(renderer, + px, py, + px2 - rot_vecy * 20.0f, + py2 + rot_vecx * 20.0f); } if (last_was_eraser) { @@ -359,7 +359,7 @@ static void process_event(SDL_Event event) SDL_HideCursor(); last_x = ev->x; last_y = ev->y; - update_axes(ev->axes); + update_axes(ev->axes); last_was_eraser = ev->pen_state & SDL_PEN_ERASER_MASK; #if VERBOSE SDL_Log("[%lu] pen motion: %s %u at (%.4f, %.4f); pressure=%.3f, tilt=%.3f/%.3f, dist=%.3f [buttons=%02x]\n", @@ -375,7 +375,7 @@ static void process_event(SDL_Event event) SDL_PenTipEvent *ev = &event.ptip; last_x = ev->x; last_y = ev->y; - update_axes(ev->axes); + update_axes(ev->axes); last_was_eraser = ev->tip == SDL_PEN_TIP_ERASER; last_button = ev->pen_state & 0xf; /* button mask */ last_touching = (event.type == SDL_EVENT_PEN_DOWN); @@ -389,7 +389,7 @@ static void process_event(SDL_Event event) SDL_HideCursor(); last_x = ev->x; last_y = ev->y; - update_axes(ev->axes); + update_axes(ev->axes); if (last_pressure > 0.0f && !last_touching) { SDL_LogWarn(SDL_LOG_CATEGORY_TEST, "[%lu] : reported pressure %.5f even though pen is not touching surface",