From 225c58c10dc0dd3e16b5c0f13f274ed6b29c2a15 Mon Sep 17 00:00:00 2001 From: Peter0x44 Date: Thu, 21 Sep 2023 10:37:47 +0100 Subject: [PATCH] Move removing console windows next to disabling tracelog. Often users want both, it helps to have the information next to it --- Frequently-Asked-Questions.md | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/Frequently-Asked-Questions.md b/Frequently-Asked-Questions.md index d2fb7cc..a62d296 100644 --- a/Frequently-Asked-Questions.md +++ b/Frequently-Asked-Questions.md @@ -5,6 +5,7 @@ - [What are the default paths?](#what-are-the-default-paths) - [What are the dependencies on Windows?](#what-are-the-dependencies-on-windows) - [How do I remove the log?](#how-do-i-remove-the-log) +- [How do I remove the console window?](#how-do-i-remove-the-console-window) - [How do I make a timer?](#how-do-i-make-a-timer) - [What do all the fields in `Camera2D` mean?](#what-do-all-the-fields-in-camera2d-mean) - [How do I center text on the screen?](#how-do-i-center-text-on-the-screen) @@ -17,7 +18,6 @@ - [Does raylib support Vulkan? Will raylib support it?](#does-raylib-support-vulkan-will-raylib-support-it) - [Why are my assets not loading?](#why-are-my-assets-not-loading) - [Why are my sound files not working?](#why-are-my-sound-files-not-working) -- [How do I remove the console window?](#how-do-i-remove-the-console-window) - [How do I setup a custom icon for my executable?](#how-do-i-setup-a-custom-icon-for-my-executable) - [How I deal with UTF-16 strings?](#how-i-deal-with-utf-16-strings) @@ -65,6 +65,12 @@ This page will go over some of the common questions new users have when starting Call `SetTraceLogLevel(LOG_NONE)` before `InitWindow()` +## How do I remove the console window? + +It can be removed with a compiler parameter, it depends on the platform and compiler. `gcc` supports `-Wl,--subsystem,windows` or [`-mwindows`](https://gcc.gnu.org/onlinedocs/gcc/x86-Windows-Options.html) compiler options. On Visual Studio, in Configuration Properties > Linker > System > SubSystem choose `Windows (/SUBSYSTEM:WINDOWS)` to avoid console. With other compilers there should be similar options. + + + ## How do I make a timer? raylib has no built in timer system. You are expected to keep track of time in your own code. You can do with with the `GetTime()` and `GetFrameTime()` functions. Below is an example of a simple timer struct and functions to use it. @@ -270,10 +276,6 @@ If you're getting `Failed to open file`, see the above question. If you're getti * The audio device is not initialized, it must be initialized with `InitAudioDevice()` before any sounds can be loaded. * The audio file is corrupted or not supported by raylib, try converting it to another format or using a different file. -## How do I remove the console window? - -It can be removed with a compiler parameter, it depends on the platform and compiler. `gcc` supports `-Wl,--subsystem,windows` or [`-mwindows`](https://gcc.gnu.org/onlinedocs/gcc/x86-Windows-Options.html) compiler options. On Visual Studio, in Configuration Properties > Linker > System > SubSystem choose `Windows (/SUBSYSTEM:WINDOWS)` to avoid console. With other compilers there should be similar options. - ## How do I setup a custom icon for my executable? ### Embedded icon (PE) Icon support on executables is only supported in [PE executables](https://en.wikipedia.org/wiki/Portable_Executable), usually on Windows systems. Icon can be embedded as a resource in code compilation, when creating the executable or it can be changed at runtime on execution.