mirror of
https://git.shylie.info/shylie/glerminal.git
synced 2024-12-03 18:55:52 +00:00
Print out CWD on non-windows environments for debug purposes
This commit is contained in:
parent
ffcafb5160
commit
1e0be8eca0
@ -831,6 +831,10 @@ int glerminal_load_sprites_file(const char* filename)
|
||||
|
||||
success = true;
|
||||
}
|
||||
else if (buffer)
|
||||
{
|
||||
std::cout << "Invalid image width/height" << std::endl;
|
||||
}
|
||||
|
||||
stbi_image_free(buffer);
|
||||
|
||||
|
@ -4,12 +4,21 @@
|
||||
|
||||
#include <iostream>
|
||||
|
||||
#ifndef _WIN32
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
namespace
|
||||
{
|
||||
void init()
|
||||
{
|
||||
if (!glerminal_load_sprites_file("resources/image.png"))
|
||||
{
|
||||
#ifndef _WIN32
|
||||
char buffer[257] = {};
|
||||
getcwd(buffer, 256);
|
||||
std::cout << buffer << std::endl;
|
||||
#endif
|
||||
std::cout << "Failed to load texture" << std::endl;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user