Skip to content

Commit

Permalink
fix win ci
Browse files Browse the repository at this point in the history
  • Loading branch information
sasha0552 authored Jun 27, 2024
1 parent 742597e commit 5e20dfc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/nvapi.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "nvapi.h"

#ifdef _WIN32
# include <libloaderapi.h>
# include <windows.h>
#elif __linux__
# include <dlfcn.h>
#endif
Expand Down Expand Up @@ -89,7 +89,7 @@ void nvapi_init() {
// obtain the address of the nvapi_QueryInterface function
if (lib) {
#ifdef _WIN32
nvapi_QueryInterface = (nvapi_QueryInterface_t) GetProcAddress(lib, "nvapi_QueryInterface");
nvapi_QueryInterface = (nvapi_QueryInterface_t) GetProcAddress((HMODULE) lib, "nvapi_QueryInterface");
#elif __linux__
nvapi_QueryInterface = (nvapi_QueryInterface_t) dlsym(lib, "nvapi_QueryInterface");
#endif
Expand Down Expand Up @@ -120,7 +120,7 @@ void nvapi_free() {
// release the library resources
if (lib) {
#ifdef _WIN32
FreeLibrary(lib);
FreeLibrary((HMODULE) lib);
#elif __linux__
dlclose(lib);
#endif
Expand Down

0 comments on commit 5e20dfc

Please sign in to comment.