Skip to content

Commit a4c0153

Browse files
committed
Digital Mars compiler objects to strict casting of function pointers (see commit ce60aa6)
1 parent 6af9889 commit a4c0153

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

wingui/pdcscrn.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2098,7 +2098,9 @@ This suppresses cast-function-type warnings on gcc and MinGW. */
20982098
#define MAX_LINES 50000
20992099
#define MAX_COLUMNS 50000
21002100

2101+
#ifndef __DMC__
21012102
typedef HRESULT (*dpi_aware_func_t)(int);
2103+
#endif
21022104

21032105
int PDC_scr_open(void)
21042106
{
@@ -2112,8 +2114,13 @@ int PDC_scr_open(void)
21122114

21132115
if ( shcoredll) {
21142116
static int ADJUST_DPI_PER_MONITOR = 2;
2117+
#ifdef __DMC__
2118+
FARPROC set_process_dpi_awareness_func =
2119+
GetProcAddress(shcoredll, "SetProcessDpiAwareness");
2120+
#else
21152121
dpi_aware_func_t set_process_dpi_awareness_func = (dpi_aware_func_t)
21162122
VOID_FN_PTR GetProcAddress(shcoredll, "SetProcessDpiAwareness");
2123+
#endif
21172124

21182125
if ( set_process_dpi_awareness_func) {
21192126
set_process_dpi_awareness_func(ADJUST_DPI_PER_MONITOR);

0 commit comments

Comments
 (0)