no message

This commit is contained in:
BADIM-PC\Vadim 2018-02-13 13:33:55 +03:00
parent e4eac02295
commit 31526eaf97
3 changed files with 17 additions and 30 deletions

View File

@ -941,6 +941,11 @@ static void _goFullscreen()
SDL_SetWindowFullscreen(platform.window, platform.fullscreen ? SDL_WINDOW_FULLSCREEN_DESKTOP : 0); SDL_SetWindowFullscreen(platform.window, platform.fullscreen ? SDL_WINDOW_FULLSCREEN_DESKTOP : 0);
} }
static void _showMessageBox(const char* title, const char* message)
{
SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_WARNING, title, message, NULL);
}
static System sysHandlers = static System sysHandlers =
{ {
.setClipboardText = _setClipboardText, .setClipboardText = _setClipboardText,
@ -957,6 +962,7 @@ static System sysHandlers =
.file_dialog_save = file_dialog_save, .file_dialog_save = file_dialog_save,
.goFullscreen = _goFullscreen, .goFullscreen = _goFullscreen,
.showMessageBox = _showMessageBox,
}; };
s32 main(s32 argc, char **argv) s32 main(s32 argc, char **argv)

View File

@ -2569,18 +2569,18 @@ u32 unzip(u8** dest, const u8* source, size_t size)
static void initKeymap() static void initKeymap()
{ {
// FileSystem* fs = studioImpl.fs; FileSystem* fs = studioImpl.fs;
// s32 size = 0; s32 size = 0;
// u8* data = (u8*)fsLoadFile(fs, KEYMAP_DAT_PATH, &size); u8* data = (u8*)fsLoadFile(fs, KEYMAP_DAT_PATH, &size);
// if(data) if(data)
// { {
// if(size == KEYMAP_SIZE) if(size == KEYMAP_SIZE)
// memcpy(getKeymap(), data, KEYMAP_SIZE); memcpy(getKeymap(), data, KEYMAP_SIZE);
// free(data); free(data);
// } }
} }
static void onFSInitialized(FileSystem* fs) static void onFSInitialized(FileSystem* fs)
@ -2803,26 +2803,6 @@ void studioClose()
if(studioImpl.tic80local) if(studioImpl.tic80local)
tic80_delete((tic80*)studioImpl.tic80local); tic80_delete((tic80*)studioImpl.tic80local);
// if(studioImpl.audio.cvt.buf)
// free(studioImpl.audio.cvt.buf);
// SDL_DestroyTexture(studioImpl.gamepad.texture);
// SDL_DestroyTexture(studioImpl.texture);
// if(studioImpl.mouse.texture)
// SDL_DestroyTexture(studioImpl.mouse.texture);
// SDL_DestroyRenderer(studioImpl.renderer);
// SDL_DestroyWindow(studioImpl.window);
// #if !defined (__MACOSX__)
// stucks here on macos
// SDL_CloseAudioDevice(studioImpl.audio.device);
// SDL_Quit();
// #endif
// exit(0);
} }
void setClipboardText(const char* text) void setClipboardText(const char* text)
@ -3035,5 +3015,5 @@ void netDirRequest(Net* net, const char* path, ListCallback callback, void* data
void showMessageBox(const char* title, const char* message) void showMessageBox(const char* title, const char* message)
{ {
// SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_WARNING, "Warning", buf, NULL); studioImpl.system->showMessageBox(title, message);
} }

View File

@ -232,6 +232,7 @@ typedef struct
void (*file_dialog_save)(file_dialog_save_callback callback, const char* name, const u8* buffer, size_t size, void* data, u32 mode); void (*file_dialog_save)(file_dialog_save_callback callback, const char* name, const u8* buffer, size_t size, void* data, u32 mode);
void (*goFullscreen)(); void (*goFullscreen)();
void (*showMessageBox)(const char* title, const char* message);
} System; } System;