Apologies in advance if I miss any relevant information.
So I've been following along on these tutorials in my quest to learn to program, and so far I've been doing really well and understanding much of it.
I ran into a problem in our Win32BeginRecordingInput function where at the very end my writefile fails.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15 | internal void Win32BeginRecordingInput(win32_state *State, int InputRecordingIndex)
{
DWORD BytesToWrite = 0;
State->InputRecordingIndex = InputRecordingIndex;
char FileName[WIN32_STATE_FILE_NAME_COUNT];
Win32GetInputFileLocation(State, InputRecordingIndex, sizeof(FileName), FileName);
State->RecordingHandle = CreateFileA(FileName, GENERIC_WRITE, 0, 0, CREATE_ALWAYS, 0, 0);
BytesToWrite = /*(DWORD)*/State->TotalSize;
//Assert(State->TotalSize == BytesToWrite);
DWORD BytesWritten;
WriteFile(State->RecordingHandle, State->GameMemoryBlock, BytesToWrite, &BytesWritten, 0);
}
|
So far as I can tell it matches exactly (I had the DWORD commented out for trying to get back to my working state).
After the exe hangs until it reaches memory cap for the 1GB, I stop the debugger and get "Operation taking longer than expected"
| game_memory GameMemory = {};
GameMemory.PermanentStorageSize = Megabytes((uint64)64);
GameMemory.TransientStorageSize = Gigabytes((uint64)4);
|
This was setup in an earlier video and with this code it works as expected, after a short pause from pressing 'l' it starts up and lets me record, then pushing 'l' again it begins to loop correctly. HOWEVER my loop_edit.hmi file is only set to the 64kb size.
I'm at a bit of a loss here and any help would be appreciated.