This commit is contained in:
Nguyen Duy
2024-11-05 08:41:36 +07:00
parent ebd1cb73e3
commit d7cdab6a7c
5 changed files with 11 additions and 15 deletions
+1 -1
View File
@@ -33,7 +33,7 @@ jobs:
- name: Build app - name: Build app
run: | run: |
cd app cd app
msbuild ParsecVDisplay.csproj /t:Build /p:Configuration=Debug /p:Platform=AnyCPU msbuild ParsecVDisplay.csproj /t:Build /p:Configuration=Release /p:Platform=AnyCPU
- uses: actions/upload-artifact@v4 - uses: actions/upload-artifact@v4
with: with:
+4 -4
View File
@@ -10,8 +10,8 @@ namespace ParsecVDisplay
{ {
OK, OK,
INACCESSIBLE, INACCESSIBLE,
UNKNOW, UNKNOWN,
UNKNOW_PROBLEM, UNKNOWN_PROBLEM,
DISABLED, DISABLED,
DRIVER_ERROR, DRIVER_ERROR,
RESTART_REQUIRED, RESTART_REQUIRED,
@@ -102,13 +102,13 @@ namespace ParsecVDisplay
if (devProblemNum == Native.CM_PROB_FAILED_POST_START) if (devProblemNum == Native.CM_PROB_FAILED_POST_START)
status = Status.DRIVER_ERROR; status = Status.DRIVER_ERROR;
else else
status = Status.UNKNOW_PROBLEM; status = Status.UNKNOWN_PROBLEM;
break; break;
} }
} }
else else
{ {
status = Status.UNKNOW; status = Status.UNKNOWN;
} }
} }
} }
+2 -5
View File
@@ -1,12 +1,10 @@
using Microsoft.Win32; using System;
using System;
using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
using System.Windows; using System.Windows;
using System.Windows.Controls;
using System.Windows.Input; using System.Windows.Input;
using System.Windows.Interop; using System.Windows.Interop;
using System.Windows.Navigation; using System.Windows.Navigation;
using Microsoft.Win32;
namespace ParsecVDisplay namespace ParsecVDisplay
{ {
@@ -81,7 +79,6 @@ namespace ParsecVDisplay
SystemEvents.DisplaySettingsChanged -= DisplayChanged; SystemEvents.DisplaySettingsChanged -= DisplayChanged;
} }
int count = 0;
private void UpdateDriverLabel() private void UpdateDriverLabel()
{ {
ParsecVDD.QueryVersion(out var dver); ParsecVDD.QueryVersion(out var dver);
-1
View File
@@ -4,7 +4,6 @@ using System.Drawing;
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using Microsoft.Win32; using Microsoft.Win32;
using System.Linq;
namespace ParsecVDisplay namespace ParsecVDisplay
{ {
+4 -4
View File
@@ -48,8 +48,8 @@ namespace parsec_vdd
typedef enum { typedef enum {
DEVICE_OK = 0, // Ready to use DEVICE_OK = 0, // Ready to use
DEVICE_INACCESSIBLE, // Inaccessible DEVICE_INACCESSIBLE, // Inaccessible
DEVICE_UNKNOW, // Unknow status DEVICE_UNKNOWN, // Unknown status
DEVICE_UNKNOW_PROBLEM, // Unknow problem DEVICE_UNKNOWN_PROBLEM, // Unknown problem
DEVICE_DISABLED, // Device is disabled DEVICE_DISABLED, // Device is disabled
DEVICE_DRIVER_ERROR, // Device encountered error DEVICE_DRIVER_ERROR, // Device encountered error
DEVICE_RESTART_REQUIRED, // Must restart PC to use (could ignore but would have issue) DEVICE_RESTART_REQUIRED, // Must restart PC to use (could ignore but would have issue)
@@ -147,13 +147,13 @@ static DeviceStatus QueryDeviceStatus(const GUID *classGuid, const char *deviceI
if (devProblemNum == CM_PROB_FAILED_POST_START) if (devProblemNum == CM_PROB_FAILED_POST_START)
status = DEVICE_DRIVER_ERROR; status = DEVICE_DRIVER_ERROR;
else else
status = DEVICE_UNKNOW_PROBLEM; status = DEVICE_UNKNOWN_PROBLEM;
break; break;
} }
} }
else else
{ {
status = DEVICE_UNKNOW; status = DEVICE_UNKNOWN;
} }
} }
} }