Get launcher window showing on windows 98, at which point it still just freezes

This commit is contained in:
UnknownShadow200 2021-01-06 15:41:15 +11:00
parent 15122e8f92
commit 05025d3ed8
2 changed files with 4 additions and 3 deletions

View File

@ -365,7 +365,7 @@ cc_result Directory_Enum(const cc_string* dirPath, void* obj, Directory_EnumCall
cc_string path; char pathBuffer[MAX_PATH + 10];
WCHAR str[NATIVE_STR_LEN];
WCHAR* src;
WIN32_FIND_DATA entry;
WIN32_FIND_DATAW entry;
HANDLE find;
cc_result res;
int i;
@ -626,7 +626,7 @@ void Mutex_Lock(void* handle) { EnterCriticalSection((CRITICAL_SECTION*)handle
void Mutex_Unlock(void* handle) { LeaveCriticalSection((CRITICAL_SECTION*)handle); }
void* Waitable_Create(void) {
void* handle = CreateEvent(NULL, false, false, NULL);
void* handle = CreateEventA(NULL, false, false, NULL);
if (!handle) {
Logger_Abort2(GetLastError(), "Creating waitable");
}

View File

@ -922,13 +922,14 @@ void Window_AllocFramebuffer(struct Bitmap* bmp) {
BITMAPINFO hdr = { 0 };
if (!draw_DC) draw_DC = CreateCompatibleDC(win_DC);
hdr.bmiHeader.biSize = sizeof(BITMAPINFO);
hdr.bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
hdr.bmiHeader.biWidth = bmp->width;
hdr.bmiHeader.biHeight = -bmp->height;
hdr.bmiHeader.biBitCount = 32;
hdr.bmiHeader.biPlanes = 1;
draw_DIB = CreateDIBSection(draw_DC, &hdr, DIB_RGB_COLORS, (void**)&bmp->scan0, NULL, 0);
if (!draw_DIB) Logger_Abort2(GetLastError(), "Failed to create DIB");
}
void Window_DrawFramebuffer(Rect2D r) {