more tooling
This commit is contained in:
@@ -93,6 +93,7 @@ struct SharedDevData
|
||||
{
|
||||
uint32_t ChangedShaderCount = 0;
|
||||
FileChangeNotification ChangedShaders[16];
|
||||
char ShaderLog[2048]{0};
|
||||
};
|
||||
|
||||
struct GameData
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#include <cstdlib>
|
||||
#include <cwchar>
|
||||
#include <fileapi.h>
|
||||
#include <fstream>
|
||||
#include <processthreadsapi.h>
|
||||
#include <synchapi.h>
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
@@ -109,7 +110,17 @@ void FileChangeCheck(HANDLE dirHandle, FileChangeType changeType, const wchar_t*
|
||||
}
|
||||
else if (changeType == FileChangeType::Shader)
|
||||
{
|
||||
std::system("shadercompile.bat");
|
||||
std::system("shadercompile.bat > shadercompile.log");
|
||||
Sleep(1000);
|
||||
std::ifstream shaderLogFile("shadercompile.log");
|
||||
if (shaderLogFile.is_open())
|
||||
{
|
||||
shaderLogFile.seekg(0, std::ios::end);
|
||||
uint32_t size = bx::min(BX_COUNTOF(Shared.Dev.ShaderLog), shaderLogFile.tellg());
|
||||
shaderLogFile.seekg(0);
|
||||
shaderLogFile.read(Shared.Dev.ShaderLog, size);
|
||||
shaderLogFile.close();
|
||||
}
|
||||
}
|
||||
else if (changeType == FileChangeType::CompiledShader)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user