mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-10-30 17:41:41 +01:00
Library (Windows): prefers Ldr APIs
This commit is contained in:
@@ -63,8 +63,8 @@ static const char* detectWithWmi(FFlist* result)
|
||||
|
||||
static const char* detectWithDdcci(const FFDisplayServerResult* displayServer, FFlist* result)
|
||||
{
|
||||
HMODULE gdi32 = GetModuleHandleW(L"gdi32.dll");
|
||||
if (!gdi32) return "GetModuleHandleW(gdi32.dll) failed";
|
||||
void* gdi32 = ffLibraryGetModule(L"gdi32.dll");
|
||||
if (!gdi32) return "ffLibraryGetModule(gdi32.dll) failed";
|
||||
FF_LIBRARY_LOAD_SYMBOL_MESSAGE(gdi32, GetPhysicalMonitors)
|
||||
FF_LIBRARY_LOAD_SYMBOL_MESSAGE(gdi32, DDCCIGetVCPFeature)
|
||||
FF_LIBRARY_LOAD_SYMBOL_MESSAGE(gdi32, DestroyPhysicalMonitorInternal)
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#include "opengl.h"
|
||||
#include "common/library.h"
|
||||
#include "common/printing.h"
|
||||
#include "common/windows/nt.h"
|
||||
|
||||
#include <windows.h>
|
||||
#include <GL/gl.h>
|
||||
@@ -81,7 +82,7 @@ static const char* wglDetectOpenGL(FFOpenGLResult* result)
|
||||
FF_LIBRARY_LOAD_SYMBOL_VAR_MESSAGE(opengl32, data, wglDeleteContext);
|
||||
FF_LIBRARY_LOAD_SYMBOL_VAR_MESSAGE(opengl32, data, glGetString);
|
||||
|
||||
HINSTANCE hInstance = GetModuleHandleW(NULL);
|
||||
HINSTANCE hInstance = ffGetPeb()->ImageBaseAddress;
|
||||
|
||||
WNDCLASSW wc = {
|
||||
.lpfnWndProc = DefWindowProcW,
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#include "tpm.h"
|
||||
#include "common/library.h"
|
||||
|
||||
#include <windef.h>
|
||||
#include <tbs.h>
|
||||
#include <winerror.h>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user