Skip to content

Commit 45f77b1

Browse files
committed
WinMain -> main
1 parent c51360e commit 45f77b1

4 files changed

Lines changed: 7 additions & 9 deletions

File tree

.github/workflows/build.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,4 @@ jobs:
9595
working-directory: ./workdir
9696
run: |
9797
& ".\test.exe"
98-
if ($LASTEXITCODE -ne 0) {
99-
Write-Error "Tests failed with exit code $LASTEXITCODE"
100-
exit $LASTEXITCODE
101-
}
102-
Write-Host "All tests passed!"
98+
exit $LASTEXITCODE

main.sharpmake.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -394,6 +394,8 @@ public override void ConfigureAll(Configuration conf, CustomTarget target)
394394
{
395395
base.ConfigureAll(conf, target);
396396

397+
conf.Options.Remove(Options.Vc.Linker.SubSystem.Windows);
398+
397399
conf.VcxprojUserFile = new Project.Configuration.VcxprojUserFileSettings();
398400
conf.VcxprojUserFile.LocalDebuggerWorkingDirectory = @"[project.SharpmakeCsPath]\workdir";
399401

sources/HAL/API/D3D12/HAL.D3D12.Device.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,9 +160,10 @@ namespace HAL
160160

161161
native_device.Reset();
162162

163-
IDXGIDebug* debugDev;
163+
IDXGIDebug* debugDev = nullptr;
164164
HRESULT hr = DXGIGetDebugInterface1(0, IID_PPV_ARGS(&debugDev));
165-
hr = debugDev->ReportLiveObjects(DXGI::DEBUG_ALL, DXGI::DEBUG_RLO_ALL);
165+
if (SUCCEEDED(hr) && debugDev)
166+
debugDev->ReportLiveObjects(DXGI::DEBUG_ALL, DXGI::DEBUG_RLO_ALL);
166167
}
167168

168169
size_t Device::get_vram()

sources/Test/main.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import Test.FileSystem;
99
import Test.Profiling;
1010
import Test.HAL;
1111
import Core;
12-
import windows;
1312

1413
void SetupLogging()
1514
{
@@ -20,7 +19,7 @@ void SetupLogging()
2019
Log::get().set_logging_level(Log::LEVEL_ALL);
2120
}
2221

23-
int WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd)
22+
int main()
2423
{
2524
SetupLogging();
2625

0 commit comments

Comments
 (0)