From acb020147d4a6129479316d9e7146f38e49d59e9 Mon Sep 17 00:00:00 2001 From: Patryk Obara Date: Fri, 20 Mar 2020 22:37:40 +0100 Subject: [PATCH] Move "extern C" to ppscale header --- src/gui/sdlmain.cpp | 2 -- src/libs/ppscale/ppscale.h | 8 ++++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/gui/sdlmain.cpp b/src/gui/sdlmain.cpp index 5dc8d94e..f0eb20db 100644 --- a/src/gui/sdlmain.cpp +++ b/src/gui/sdlmain.cpp @@ -57,9 +57,7 @@ #include "control.h" #include "render.h" -extern "C" { #include "../libs/ppscale/ppscale.h" -} #define MAPPERFILE "mapper-sdl2-" VERSION ".map" //#define DISABLE_JOYSTICK diff --git a/src/libs/ppscale/ppscale.h b/src/libs/ppscale/ppscale.h index a910e418..f93ef66d 100644 --- a/src/libs/ppscale/ppscale.h +++ b/src/libs/ppscale/ppscale.h @@ -9,6 +9,10 @@ #ifndef PPSCALE_H #define PPSCALE_H +#ifdef __cplusplus +extern "C" { +#endif + int pp_getscale /* calculate integer scales for pixel-perfect magnification */ ( int win, int hin, /* input dimensions */ double par, /* input pixel aspect ratio */ @@ -30,4 +34,8 @@ int pp_scale /* magnify an image in a pixel-perfect manner */ int sx, int sy /* horisontal and vertical scales */ ); /* return -1 on error and 0 on success */ +#ifdef __cplusplus +} +#endif + #endif /* PPSCALE_H */