Skip to content

Commit 802b0b1

Browse files
committed
Fix some unused variable warnings.
1 parent 071bd52 commit 802b0b1

File tree

4 files changed

+13
-4
lines changed

4 files changed

+13
-4
lines changed

application/input/input_sdl.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,13 @@ void InputTrackerSDL::update(InputTracker &tracker)
5151

5252
for (int i = 0; i < int(InputTracker::Joypads); i++)
5353
{
54+
LOGI("SDL polling!\n");
5455
auto *pad = pads[i];
5556
if (!pad)
5657
continue;
5758

59+
LOGI("SDL polling #2!\n");
60+
5861
static const struct
5962
{
6063
JoypadKey gkey;

application/platforms/application_sdl3.cpp

+7
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,9 @@ struct WSIPlatformSDL : GraniteWSIPlatform
116116

117117
LOGI("SDL_Init(GAMEPAD) took %.3f seconds async.\n", tmp_timer.end());
118118

119+
LOGI("Pushing task to main thread.\n");
119120
push_task_to_main_thread([this]() {
121+
LOGI("Running task in main thread.\n");
120122
if (!pad.init(get_input_tracker(), [](std::function<void ()> func) { func(); }))
121123
LOGE("Failed to init gamepad tracker.\n");
122124

@@ -336,8 +338,12 @@ struct WSIPlatformSDL : GraniteWSIPlatform
336338
begin_async_input_handling();
337339
{
338340
process_events_async_thread();
341+
LOGI("nyaa 1\n");
339342
if (gamepad_init_async.load(std::memory_order_acquire))
343+
{
344+
LOGI("nyaa 2\n");
340345
pad.update(get_input_tracker());
346+
}
341347
}
342348
end_async_input_handling();
343349
get_input_tracker().dispatch_current_state(0.0, override_handler);
@@ -429,6 +435,7 @@ struct WSIPlatformSDL : GraniteWSIPlatform
429435
{
430436
if (e.type == wake_event_type)
431437
{
438+
LOGI("Processing events main thread.\n");
432439
process_events_main_thread();
433440
return true;
434441
}

vulkan/wsi_dxgi.cpp

+2-3
Original file line numberDiff line numberDiff line change
@@ -225,8 +225,7 @@ void DXGIInteropSwapchain::reset_backbuffer_state()
225225
backbuffers.clear();
226226
}
227227

228-
bool DXGIInteropSwapchain::setup_per_frame_state(PerFrameState &state, unsigned index,
229-
unsigned width, unsigned height, VkFormat format)
228+
bool DXGIInteropSwapchain::setup_per_frame_state(PerFrameState &state, unsigned index)
230229
{
231230
HRESULT hr;
232231
if (FAILED(hr = swapchain->GetBuffer(index, IID_PPV_ARGS(&state.backbuffer))))
@@ -363,7 +362,7 @@ bool DXGIInteropSwapchain::init_swapchain(HWND hwnd_, VkSurfaceFormatKHR format,
363362

364363
backbuffers.resize(desc.BufferCount);
365364
for (unsigned i = 0; i < desc.BufferCount; i++)
366-
if (!setup_per_frame_state(backbuffers[i], i, width, height, format.format))
365+
if (!setup_per_frame_state(backbuffers[i], i))
367366
return false;
368367

369368
ExternalHandle imported_image;

vulkan/wsi_dxgi.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ class DXGIInteropSwapchain
7575
ComPtr<ID3D12Resource> blit_backbuffer;
7676
ImageHandle vulkan_backbuffer;
7777

78-
bool setup_per_frame_state(PerFrameState &state, unsigned index, unsigned width, unsigned height, VkFormat format);
78+
bool setup_per_frame_state(PerFrameState &state, unsigned index);
7979
void reset_backbuffer_state();
8080

8181
uint64_t completed_presents = 0;

0 commit comments

Comments
 (0)