mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-06-23 15:30:45 -04:00
Always return 0 from the GUI entry point in windows
This commit is contained in:
parent
70ee81c678
commit
24d2849dfa
@ -11,7 +11,6 @@ wWinMain(HINSTANCE Inst, HINSTANCE PrevInst,
|
|||||||
wchar_t *CmdLine, int CmdShow) {
|
wchar_t *CmdLine, int CmdShow) {
|
||||||
|
|
||||||
wchar_t *stdout_redirect, *stderr_redirect, basename[50];
|
wchar_t *stdout_redirect, *stderr_redirect, basename[50];
|
||||||
int ret = 0;
|
|
||||||
|
|
||||||
set_gui_app((char)1);
|
set_gui_app((char)1);
|
||||||
|
|
||||||
@ -20,7 +19,7 @@ wWinMain(HINSTANCE Inst, HINSTANCE PrevInst,
|
|||||||
stdout_redirect = redirect_out_stream(basename, (char)1);
|
stdout_redirect = redirect_out_stream(basename, (char)1);
|
||||||
stderr_redirect = redirect_out_stream(basename, (char)0);
|
stderr_redirect = redirect_out_stream(basename, (char)0);
|
||||||
|
|
||||||
ret = execute_python_entrypoint(BASENAME, MODULE, FUNCTION,
|
execute_python_entrypoint(BASENAME, MODULE, FUNCTION,
|
||||||
stdout_redirect, stderr_redirect);
|
stdout_redirect, stderr_redirect);
|
||||||
|
|
||||||
if (stdout != NULL) fclose(stdout);
|
if (stdout != NULL) fclose(stdout);
|
||||||
@ -29,7 +28,7 @@ wWinMain(HINSTANCE Inst, HINSTANCE PrevInst,
|
|||||||
DeleteFile(stdout_redirect);
|
DeleteFile(stdout_redirect);
|
||||||
DeleteFile(stderr_redirect);
|
DeleteFile(stderr_redirect);
|
||||||
|
|
||||||
return ret;
|
return 0; // This should really be returning the value set in the WM_QUIT message, but I cannot be bothered figuring out how to get that.
|
||||||
}
|
}
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user