mirror of
https://github.com/Ed94/HandmadeHero.git
synced 2025-07-01 11:21:05 -07:00
Got clang to build parity with msvc
This commit is contained in:
@ -59,7 +59,7 @@ enum CS : UINT
|
||||
CS_Horizontal_Redraw = CS_HREDRAW,
|
||||
CS_Vertical_Redraw = CS_VREDRAW,
|
||||
};
|
||||
|
||||
|
||||
enum CW : s32
|
||||
{
|
||||
CW_Use_Default = CW_USEDEFAULT,
|
||||
|
@ -503,6 +503,9 @@ engine::ModuleAPI load_engine_module_api()
|
||||
{
|
||||
OutputDebugStringA( "Loaded engine module API\n" );
|
||||
}
|
||||
else {
|
||||
fatal( "Failed to load engine module API!\n" );
|
||||
}
|
||||
return engine_api;
|
||||
}
|
||||
|
||||
@ -865,6 +868,13 @@ WinMain( HINSTANCE instance, HINSTANCE prev_instance, LPSTR commandline, int sho
|
||||
}
|
||||
}
|
||||
|
||||
// Populate an initial polling state for the inputs
|
||||
poll_input( window_handle, & input, jsl_num_devices, jsl_device_handles
|
||||
, old_keyboard, new_keyboard
|
||||
, old_mouse, new_mouse
|
||||
, old_xpads, new_xpads
|
||||
, old_ds_pads, new_ds_pads );
|
||||
|
||||
engine_api.startup( rcast(engine::OffscreenBuffer*, & Surface_Back_Buffer.memory), & engine_memory, & platform_api );
|
||||
|
||||
u64 last_frame_clock = timing_get_wall_clock();
|
||||
|
@ -2,6 +2,10 @@
|
||||
#include "platform.hpp"
|
||||
#include "jsl.hpp"
|
||||
#include "win32.hpp"
|
||||
|
||||
NS_PLATFORM_BEGIN
|
||||
using namespace win32;
|
||||
NS_PLATFORM_END
|
||||
#endif
|
||||
|
||||
NS_PLATFORM_BEGIN
|
||||
@ -127,8 +131,10 @@ b32 file_read_content( File* file )
|
||||
return {};
|
||||
}
|
||||
|
||||
// This has to be done or for some reason file_handle will be consumed to null by `GetFileSizeEx` (Clang bug?)
|
||||
HANDLE file_handle_clang_bug = file_handle;
|
||||
u32 size;
|
||||
GetFileSizeEx( file_handle, rcast(LARGE_INTEGER*, &size) );
|
||||
GetFileSizeEx( file_handle_clang_bug, rcast(LARGE_INTEGER*, &size) );
|
||||
if ( size == 0 )
|
||||
{
|
||||
// TODO(Ed) : Logging
|
||||
|
Reference in New Issue
Block a user