Skip to content

Commit c6d6cb4

Browse files
committed
fix(sdllp): suppress C4740 at source level for naked asm exports
1 parent dd6ed84 commit c6d6cb4

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/sdllp.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,11 @@ FARPROC sdllp::get_export(const char* function, const char* library)
5050
}
5151

5252
#define LIBRARY "d3d9.dll"
53+
54+
// C4740: inline asm in naked functions suppresses global optimization — expected behavior here
55+
#pragma warning(push)
56+
#pragma warning(disable: 4740)
5357
EXPORT(D3DPERF_BeginEvent)
5458
EXPORT(D3DPERF_EndEvent)
5559
EXPORT(Direct3DCreate9)
60+
#pragma warning(pop)

0 commit comments

Comments
 (0)