This commit is contained in:
AzaezelX 2022-03-23 01:43:08 -05:00
parent ee4253c982
commit 2614274639
1225 changed files with 148950 additions and 51674 deletions

View file

@ -1,11 +1,10 @@
/* See COPYING.txt for the full license governing this code. */
/* See LICENSE.txt for the full license governing this code. */
/**
* \file windows_process.c
* \file windows_process.c
*
* Source file for the process API on windows.
*/
#include <SDL.h>
#include <SDL_test.h>
#include <string.h>
@ -16,7 +15,7 @@
#if defined(__WIN32__)
void
LogLastError(char* str)
LogLastError(const char* str)
{
LPVOID buffer;
DWORD dw = GetLastError();
@ -61,7 +60,7 @@ SDL_LaunchProcess(char* file, char* args, SDL_ProcessInfo* pinfo)
working_directory = (char*)SDL_malloc(path_length + 1);
if(!working_directory)
{
SDLTest_LogError("Could not allocate working_directory - malloc() failed.");
SDLTest_LogError("Could not allocate working_directory - SDL_malloc() failed.");
return 0;
}
@ -80,7 +79,7 @@ SDL_LaunchProcess(char* file, char* args, SDL_ProcessInfo* pinfo)
command_line = (char*)SDL_malloc(path_length + args_length + 2);
if(!command_line)
{
SDLTest_LogError("Could not allocate command_line - malloc() failed.");
SDLTest_LogError("Could not allocate command_line - SDL_malloc() failed.");
return 0;
}
SDL_memcpy(command_line, file, path_length);
@ -175,7 +174,7 @@ CloseWindowCallback(HWND hwnd, LPARAM lparam)
GetWindowThreadProcessId(hwnd, &pid);
if(pid == pinfo->pi.dwProcessId)
{
DWORD result;
DWORD_PTR result;
if(!SendMessageTimeout(hwnd, WM_CLOSE, 0, 0, SMTO_BLOCK,
1000, &result))
{

View file

@ -1,6 +1,6 @@
/* See COPYING.txt for the full license governing this code. */
/* See LICENSE.txt for the full license governing this code. */
/**
* \file windows_screenshot.c
* \file windows_screenshot.c
*
* Source file for the screenshot API on windows.
*/
@ -14,9 +14,9 @@
#endif
#if defined(__WIN32__)
#include <Windows.h>
#include <windows.h>
void LogLastError(char* str);
void LogLastError(const char* str);
static int img_num;
static SDL_ProcessInfo screenshot_pinfo;
@ -241,7 +241,7 @@ ScreenshotWindow(HWND hwnd, char* filename, SDL_bool only_client_area)
goto screenshotwindow_cleanup_capturebitmap;
}
/* free resources */
/* Free resources */
screenshotwindow_cleanup_capturebitmap:
if(!DeleteObject(capturebitmap))
@ -297,7 +297,7 @@ ScreenshotHwnd(HWND hwnd, LPARAM lparam)
filename = (char*)SDL_malloc(len * sizeof(char));
if(!filename)
{
SDLTest_LogError("malloc() failed");
SDLTest_LogError("SDL_malloc() failed");
return FALSE;
}