Skip to content
This repository was archived by the owner on Nov 2, 2023. It is now read-only.

Commit efe14cd

Browse files
committed
Updated tracing routines
1 parent 6942f17 commit efe14cd

File tree

11 files changed

+291
-299
lines changed

11 files changed

+291
-299
lines changed

sys/Debugging.hpp

Lines changed: 0 additions & 9 deletions
This file was deleted.

sys/Driver.cpp

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,6 @@
5151
#include "XusbPdo.hpp"
5252
#include "Ds4Pdo.hpp"
5353

54-
#include "Debugging.hpp"
55-
5654
using ViGEm::Bus::Core::PDO_IDENTIFICATION_DESCRIPTION;
5755
using ViGEm::Bus::Core::EmulationTargetPDO;
5856
using ViGEm::Bus::Targets::EmulationTargetXUSB;
@@ -147,7 +145,7 @@ NTSTATUS Bus_EvtDeviceAdd(IN WDFDRIVER Driver, IN PWDFDEVICE_INIT DeviceInit)
147145

148146
if (deviceAlreadyExists)
149147
{
150-
TraceEvents(TRACE_LEVEL_ERROR,
148+
TraceError(
151149
TRACE_DRIVER,
152150
"Device with interface GUID {%!GUID!} already exists (%ws)",
153151
&GUID_DEVINTERFACE_BUSENUM_VIGEM,
@@ -201,7 +199,7 @@ NTSTATUS Bus_EvtDeviceAdd(IN WDFDRIVER Driver, IN PWDFDEVICE_INIT DeviceInit)
201199

202200
if (!NT_SUCCESS(status))
203201
{
204-
TraceEvents(TRACE_LEVEL_ERROR,
202+
TraceError(
205203
TRACE_DRIVER,
206204
"WdfDeviceCreate failed with status %!STATUS!",
207205
status);
@@ -211,7 +209,7 @@ NTSTATUS Bus_EvtDeviceAdd(IN WDFDRIVER Driver, IN PWDFDEVICE_INIT DeviceInit)
211209
pFDOData = FdoGetData(device);
212210
if (pFDOData == NULL)
213211
{
214-
TraceEvents(TRACE_LEVEL_ERROR,
212+
TraceError(
215213
TRACE_DRIVER,
216214
"FdoGetData failed");
217215
return STATUS_UNSUCCESSFUL;
@@ -234,7 +232,7 @@ NTSTATUS Bus_EvtDeviceAdd(IN WDFDRIVER Driver, IN PWDFDEVICE_INIT DeviceInit)
234232

235233
if (!NT_SUCCESS(status))
236234
{
237-
TraceEvents(TRACE_LEVEL_ERROR,
235+
TraceError(
238236
TRACE_DRIVER,
239237
"WdfIoQueueCreate failed with status %!STATUS!",
240238
status);
@@ -249,7 +247,7 @@ NTSTATUS Bus_EvtDeviceAdd(IN WDFDRIVER Driver, IN PWDFDEVICE_INIT DeviceInit)
249247

250248
if (!NT_SUCCESS(status))
251249
{
252-
TraceEvents(TRACE_LEVEL_ERROR,
250+
TraceError(
253251
TRACE_DRIVER,
254252
"WdfDeviceCreateDeviceInterface failed with status %!STATUS!",
255253
status);
@@ -300,7 +298,7 @@ Bus_DeviceFileCreate(
300298

301299
if (pFileData == NULL)
302300
{
303-
TraceEvents(TRACE_LEVEL_ERROR,
301+
TraceError(
304302
TRACE_DRIVER,
305303
"FileObjectGetData failed to return file object from WDFFILEOBJECT 0x%p",
306304
FileObject);
@@ -310,7 +308,7 @@ Bus_DeviceFileCreate(
310308
pFDOData = FdoGetData(Device);
311309
if (pFDOData == NULL)
312310
{
313-
TraceEvents(TRACE_LEVEL_ERROR,
311+
TraceError(
314312
TRACE_DRIVER,
315313
"FdoGetData failed");
316314
status = STATUS_NO_SUCH_DEVICE;
@@ -364,7 +362,7 @@ Bus_FileClose(
364362
pFileData = FileObjectGetData(FileObject);
365363
if (pFileData == NULL)
366364
{
367-
TraceEvents(TRACE_LEVEL_ERROR,
365+
TraceError(
368366
TRACE_DRIVER,
369367
"FileObjectGetData failed to return file object from WDFFILEOBJECT 0x%p",
370368
FileObject);
@@ -376,7 +374,7 @@ Bus_FileClose(
376374
pFDOData = FdoGetData(device);
377375
if (pFDOData == NULL)
378376
{
379-
TraceEvents(TRACE_LEVEL_ERROR,
377+
TraceError(
380378
TRACE_DRIVER,
381379
"FdoGetData failed");
382380
status = STATUS_NO_SUCH_DEVICE;
@@ -408,7 +406,7 @@ Bus_FileClose(
408406
break;
409407
}
410408

411-
//TraceEvents(TRACE_LEVEL_VERBOSE,
409+
//TraceVerbose(
412410
// TRACE_DRIVER,
413411
// "PDO properties: status = %!STATUS!, pdoPID = %d, curPID = %d, pdoSID = %d, curSID = %d, internal = %d",
414412
// (int)childInfo.Status,
@@ -432,7 +430,7 @@ Bus_FileClose(
432430
status = WdfChildListUpdateChildDescriptionAsMissing(list, &description.Header);
433431
if (!NT_SUCCESS(status))
434432
{
435-
TraceEvents(TRACE_LEVEL_ERROR,
433+
TraceError(
436434
TRACE_DRIVER,
437435
"WdfChildListUpdateChildDescriptionAsMissing failed with status %!STATUS!",
438436
status);

0 commit comments

Comments
 (0)