Window title fix
This commit is contained in:
@@ -6,8 +6,6 @@
|
|||||||
|
|
||||||
const int ENGINE_VERSION_MAJOR = 0;
|
const int ENGINE_VERSION_MAJOR = 0;
|
||||||
const int ENGINE_VERSION_MINOR = 15;
|
const int ENGINE_VERSION_MINOR = 15;
|
||||||
#define TOSTR_MACRO(x) #x
|
|
||||||
#define ENGINE_VERSION TOSTR_MACRO(ENGINE_VERSION_MAJOR) "." TOSTR_MACRO(ENGINE_VERSION_MINOR);
|
|
||||||
|
|
||||||
const int CHUNK_W = 16;
|
const int CHUNK_W = 16;
|
||||||
const int CHUNK_H = 256;
|
const int CHUNK_H = 256;
|
||||||
|
|||||||
+3
-1
@@ -18,7 +18,9 @@ struct DisplaySettings {
|
|||||||
/* GLFW swap interval value, 0 - unlimited fps, 1 - vsync*/
|
/* GLFW swap interval value, 0 - unlimited fps, 1 - vsync*/
|
||||||
int swapInterval = 1;
|
int swapInterval = 1;
|
||||||
/* Window title */
|
/* Window title */
|
||||||
const char* title = "VoxelEngine-Cpp v" ENGINE_VERSION;
|
std::string title = "VoxelEngine-Cpp v" +
|
||||||
|
std::to_string(ENGINE_VERSION_MAJOR) + "." +
|
||||||
|
std::to_string(ENGINE_VERSION_MINOR);
|
||||||
};
|
};
|
||||||
|
|
||||||
struct ChunksSettings {
|
struct ChunksSettings {
|
||||||
|
|||||||
@@ -128,7 +128,7 @@ int Window::initialize(DisplaySettings& settings){
|
|||||||
glfwWindowHint(GLFW_RESIZABLE, GL_TRUE);
|
glfwWindowHint(GLFW_RESIZABLE, GL_TRUE);
|
||||||
glfwWindowHint(GLFW_SAMPLES, settings.samples);
|
glfwWindowHint(GLFW_SAMPLES, settings.samples);
|
||||||
|
|
||||||
window = glfwCreateWindow(width, height, settings.title, nullptr, nullptr);
|
window = glfwCreateWindow(width, height, settings.title.c_str(), nullptr, nullptr);
|
||||||
if (window == nullptr){
|
if (window == nullptr){
|
||||||
cerr << "Failed to create GLFW Window" << endl;
|
cerr << "Failed to create GLFW Window" << endl;
|
||||||
glfwTerminate();
|
glfwTerminate();
|
||||||
|
|||||||
Reference in New Issue
Block a user