mirror of
https://github.com/antopilo/Nuake.git
synced 2026-09-15 20:08:54 +03:00
Conditional branch for linux
This commit is contained in:
@@ -34,6 +34,7 @@ namespace Nuake
|
||||
// Creates the window
|
||||
s_CurrentWindow = Window::Get();
|
||||
|
||||
Logger::Log("Input initializing");
|
||||
Input::Init();
|
||||
Renderer2D::Init();
|
||||
Logger::Log("Engine initialized");
|
||||
|
||||
@@ -28,8 +28,13 @@ namespace Nuake {
|
||||
m_Soloud = CreateRef<SoLoud::Soloud>();
|
||||
|
||||
// TODO: Sample rate, back end, buffer size, flags.
|
||||
m_Soloud->init(SoLoud::Soloud::CLIP_ROUNDOFF,SoLoud::Soloud::ALSA);
|
||||
#ifdef NK_WIN
|
||||
m_Soloud->init();
|
||||
#endif
|
||||
|
||||
#ifdef NK_LINUX
|
||||
m_Soloud->init(SoLoud::Soloud::CLIP_ROUNDOFF, SoLoud::Soloud::ALSA)
|
||||
#endif
|
||||
m_AudioThread = std::thread(&AudioManager::AudioThreadLoop, this);
|
||||
|
||||
Logger::Log("Audio manager initialized", "audio", VERBOSE);
|
||||
|
||||
@@ -17,6 +17,7 @@ namespace Nuake
|
||||
|
||||
void Renderer2D::Init()
|
||||
{
|
||||
Logger::Log("Renderer 2D initiaizing", "render2d");
|
||||
UIShader = ShaderManager::GetShader("Resources/Shaders/ui.shader");
|
||||
TextShader = ShaderManager::GetShader("Resources/Shaders/sdf_text.shader");
|
||||
|
||||
@@ -30,6 +31,8 @@ namespace Nuake
|
||||
1.0f, 1.0f, 1.0f, 1.0f, 1.0f
|
||||
};
|
||||
|
||||
|
||||
Logger::Log("Renderer 2D create VAOS", "render2d");
|
||||
// setup plane VAO
|
||||
glGenVertexArrays(1, &Renderer2D::VAO);
|
||||
glGenBuffers(1, &Renderer2D::VBO);
|
||||
|
||||
@@ -79,7 +79,6 @@ namespace Nuake {
|
||||
{"ScriptableEntity", GET_STATIC_RESOURCE_SCRIPT_SRC(StaticResources::Resources_Scripts_ScriptableEntity_wren)},
|
||||
};
|
||||
|
||||
|
||||
const std::string NuakeModulePrefix = "Nuake:";
|
||||
WrenLoadModuleResult myLoadModule(WrenVM* vm, const char* name)
|
||||
{
|
||||
|
||||
@@ -24,15 +24,15 @@
|
||||
#include <string.h>
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
// strcasecmp(const char* a, const char* b)
|
||||
// {
|
||||
// #ifdef NK_WIN
|
||||
// return _stricmp(a, b);
|
||||
// #endif
|
||||
// #ifdef NK_LINUX
|
||||
// return strcasecmp(a, b);
|
||||
// #endif
|
||||
// }
|
||||
|
||||
|
||||
#ifdef NK_WIN
|
||||
strcasecmp(const char* a, const char* b)
|
||||
{
|
||||
return _stricmp(a, b);
|
||||
}
|
||||
#endif
|
||||
|
||||
#undef assert
|
||||
#define assert(x)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user