fix
This commit is contained in:
@@ -21,6 +21,7 @@ SOFTWARE.
|
|||||||
|
|
||||||
* --------------------------------------------------------------------------*/
|
* --------------------------------------------------------------------------*/
|
||||||
#include "../include/ci2.h"
|
#include "../include/ci2.h"
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
int WINAPI ci2_wgui(
|
int WINAPI ci2_wgui(
|
||||||
HINSTANCE hInstance,
|
HINSTANCE hInstance,
|
||||||
@@ -34,12 +35,13 @@ int WINAPI ci2_wgui(
|
|||||||
UNUSED(nCmdShow);
|
UNUSED(nCmdShow);
|
||||||
|
|
||||||
// Create a console so stdout/stderr work
|
// Create a console so stdout/stderr work
|
||||||
|
/*
|
||||||
if (AllocConsole()) {
|
if (AllocConsole()) {
|
||||||
FILE *f;
|
FILE *f;
|
||||||
freopen_s(&f, "CONOUT$", "w", stdout);
|
freopen_s(&f, "CONOUT$", "w", stdout);
|
||||||
freopen_s(&f, "CONOUT$", "w", stderr);
|
freopen_s(&f, "CONOUT$", "w", stderr);
|
||||||
wprintf(L"GUI but allocated a console\n");
|
wprintf(L"GUI but allocated a console\n");
|
||||||
}
|
}*/
|
||||||
|
|
||||||
static ci2_sys_char *ci2_window_title = L"Win32-GUI Window Title";
|
static ci2_sys_char *ci2_window_title = L"Win32-GUI Window Title";
|
||||||
CI2_Window* window = ci2_create_window(ci2_window_title, 800, 600);
|
CI2_Window* window = ci2_create_window(ci2_window_title, 800, 600);
|
||||||
@@ -56,7 +58,7 @@ int WINAPI ci2_wgui(
|
|||||||
ci2_destroy_window(window);
|
ci2_destroy_window(window);
|
||||||
ci2_shutdown();
|
ci2_shutdown();
|
||||||
|
|
||||||
return result;
|
return EXIT_SUCCESS;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -81,7 +83,7 @@ int WINAPI ci2_wcli(int argc, ci2_sys_char *wargv[]) {
|
|||||||
|
|
||||||
ci2_destroy_window(window);
|
ci2_destroy_window(window);
|
||||||
ci2_shutdown();
|
ci2_shutdown();
|
||||||
return result;
|
return EXIT_SUCCESS;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ SOFTWARE.
|
|||||||
int WINAPI wWinMain(
|
int WINAPI wWinMain(
|
||||||
HINSTANCE hInstance,
|
HINSTANCE hInstance,
|
||||||
HINSTANCE hPrevInstance,
|
HINSTANCE hPrevInstance,
|
||||||
LPSTR lpCmdLine,
|
LPWSTR lpCmdLine,
|
||||||
int nCmdShow)
|
int nCmdShow)
|
||||||
{
|
{
|
||||||
return ci2_wgui(hInstance, hPrevInstance, lpCmdLine,nCmdShow);
|
return ci2_wgui(hInstance, hPrevInstance, lpCmdLine,nCmdShow);
|
||||||
|
|||||||
Reference in New Issue
Block a user