mirror of
https://github.com/love2d/megasource.git
synced 2026-08-21 05:02:11 +02:00
Update SDL2 to the latest commit (85bbf8e)
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
#include <stdio.h>
|
||||
|
||||
#include "SDL.h"
|
||||
#include "testutils.h"
|
||||
|
||||
static size_t
|
||||
widelen(char *data)
|
||||
@@ -43,7 +44,7 @@ main(int argc, char *argv[])
|
||||
"UCS-4",
|
||||
};
|
||||
|
||||
const char * fname;
|
||||
char * fname;
|
||||
char buffer[BUFSIZ];
|
||||
char *ucs4;
|
||||
char *test[2];
|
||||
@@ -54,12 +55,13 @@ main(int argc, char *argv[])
|
||||
/* Enable standard application logging */
|
||||
SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);
|
||||
|
||||
fname = (argc < 2) ? "utf8.txt" : argv[1];
|
||||
fname = GetResourceFilename(argc > 1 ? argv[1] : NULL, "utf8.txt");
|
||||
file = fopen(fname, "rb");
|
||||
if (!file) {
|
||||
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Unable to open %s\n", fname);
|
||||
return (1);
|
||||
}
|
||||
SDL_free(fname);
|
||||
|
||||
while (fgets(buffer, sizeof(buffer), file)) {
|
||||
/* Convert to UCS-4 */
|
||||
|
||||
Reference in New Issue
Block a user