i1-console-output #8

Merged
Mineplay merged 7 commits from i1-console-output into main 2025-10-17 15:28:26 -05:00
Showing only changes of commit 2357205470 - Show all commits

View file

@ -21,15 +21,29 @@
*/ */
#include "../../Include/Iony/Core/Console.h" #include "../../Include/Iony/Core/Console.h"
#if defined(_WIN32)
#include <windows.h>
#elif defined(__GNUC__)
#endif
IonyError iony_print(char *text) { IonyError iony_print(char *text) {
if (text == ((void*)0)) { if (text == 0) {
return IONY_ERROR_INVALID_POINTER; return IONY_ERROR_INVALID_POINTER;
} }
#if defined(_WIN32) unsigned long text_length = 0;
while (text[text_length] != '\0') {
#elif defined(__linux__) text_length += 1;
}
#if defined(_WIN32)
static HANDLE standard_console_out_handle = GetStdHandle(STD_OUTPUT_HANDLE);
DWORD characters_written;
WriteFile(standard_console_out_handle, text, text_length, &characters_written, 0);
#elif defined(__GNUC__)
#endif #endif
return IONY_ERROR_NONE; return IONY_ERROR_NONE;