[ion/sdl/windows] Fix the build

This commit is contained in:
Romain Goyet
2019-09-20 11:07:37 +02:00
committed by EmilieNumworks
parent aa8b0964b3
commit 652a44c844
3 changed files with 6 additions and 2 deletions

View File

@@ -1,5 +1,6 @@
ion_src += $(addprefix ion/src/sdl/windows/, \ ion_src += $(addprefix ion/src/sdl/windows/, \
images.cpp \ images.cpp \
language.cpp \
resources.rc \ resources.rc \
) )
ion_src += $(addprefix ion/src/sdl/shared/, \ ion_src += $(addprefix ion/src/sdl/shared/, \

View File

@@ -1,3 +1,5 @@
#include "../shared/platform.h"
#include <SDL.h> #include <SDL.h>
#include <windows.h> #include <windows.h>
#include <olectl.h> #include <olectl.h>
@@ -32,7 +34,7 @@ HRESULT CreateStreamOnResource(const char * name, LPSTREAM * stream) {
return hr; return hr;
} }
extern "C" SDL_Texture * loadImage(SDL_Renderer * renderer, const char * identifier) { SDL_Texture * IonSDLPlatformLoadImage(SDL_Renderer * renderer, const char * identifier) {
Gdiplus::GdiplusStartupInput gdiplusStartupInput; Gdiplus::GdiplusStartupInput gdiplusStartupInput;
ULONG_PTR gdiplusToken; ULONG_PTR gdiplusToken;
Gdiplus::GdiplusStartup(&gdiplusToken, &gdiplusStartupInput, nullptr); Gdiplus::GdiplusStartup(&gdiplusToken, &gdiplusStartupInput, nullptr);

View File

@@ -1,7 +1,8 @@
#include "../shared/platform.h" #include "../shared/platform.h"
#include <winnls.h> #include <winnls.h>
const char * IonSDLPlatformGetLanguageCode() { char * IonSDLPlatformGetLanguageCode() {
/* Per documentation, the maximum number of characters allowed for the /* Per documentation, the maximum number of characters allowed for the
* language string is nine, including a terminating null character. */ * language string is nine, including a terminating null character. */
static char buffer[9] = {0}; static char buffer[9] = {0};