Skip to content

Commit 9d4adaa

Browse files
authored
Fix cpp-options and revert underscoring (#258)
1 parent 569f416 commit 9d4adaa

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

sdl2.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ library
129129

130130
if flag(recent-ish)
131131
cpp-options:
132-
-D __RECENT_ISH__
132+
-DRECENT_ISH
133133
pkgconfig-depends:
134134
sdl2 >= 2.0.10
135135
else

src/SDL/Raw/Types.hsc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ module SDL.Raw.Types (
6969
PixelFormat(..),
7070
Point(..),
7171
Rect(..),
72-
#ifdef __RECENT_ISH__
72+
#ifdef RECENT_ISH
7373
FPoint(..),
7474
FRect(..),
7575
#endif
@@ -1360,7 +1360,7 @@ instance Storable Rect where
13601360
(#poke SDL_Rect, w) ptr w
13611361
(#poke SDL_Rect, h) ptr h
13621362

1363-
#ifdef __RECENT_ISH__
1363+
#ifdef RECENT_ISH
13641364

13651365
data FPoint = FPoint
13661366
{ fPointX :: !CFloat

src/SDL/Raw/Video.hs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ module SDL.Raw.Video (
108108
renderClear,
109109
renderCopy,
110110
renderCopyEx,
111-
#ifdef __RECENT_ISH__
111+
#ifdef RECENT_ISH
112112
renderCopyExF,
113113
#endif
114114
renderDrawLine,
@@ -328,7 +328,7 @@ foreign import ccall "SDL.h SDL_QueryTexture" queryTextureFFI :: Texture -> Ptr
328328
foreign import ccall "SDL.h SDL_RenderClear" renderClearFFI :: Renderer -> IO CInt
329329
foreign import ccall "SDL.h SDL_RenderCopy" renderCopyFFI :: Renderer -> Texture -> Ptr Rect -> Ptr Rect -> IO CInt
330330
foreign import ccall "SDL.h SDL_RenderCopyEx" renderCopyExFFI :: Renderer -> Texture -> Ptr Rect -> Ptr Rect -> CDouble -> Ptr Point -> RendererFlip -> IO CInt
331-
#ifdef __RECENT_ISH__
331+
#ifdef RECENT_ISH
332332
foreign import ccall "SDL.h SDL_RenderCopyExF" renderCopyExFFFI :: Renderer -> Texture -> Ptr Rect -> Ptr FRect -> CDouble -> Ptr FPoint -> RendererFlip -> IO CInt
333333
#endif
334334
foreign import ccall "SDL.h SDL_RenderDrawLine" renderDrawLineFFI :: Renderer -> CInt -> CInt -> CInt -> CInt -> IO CInt
@@ -841,7 +841,7 @@ renderCopyEx :: MonadIO m => Renderer -> Texture -> Ptr Rect -> Ptr Rect -> CDou
841841
renderCopyEx v1 v2 v3 v4 v5 v6 v7 = liftIO $ renderCopyExFFI v1 v2 v3 v4 v5 v6 v7
842842
{-# INLINE renderCopyEx #-}
843843

844-
#ifdef __RECENT_ISH__
844+
#ifdef RECENT_ISH
845845
renderCopyExF :: MonadIO m => Renderer -> Texture -> Ptr Rect -> Ptr FRect -> CDouble -> Ptr FPoint -> RendererFlip -> m CInt
846846
renderCopyExF v1 v2 v3 v4 v5 v6 v7 = liftIO $ renderCopyExFFFI v1 v2 v3 v4 v5 v6 v7
847847
{-# INLINE renderCopyExF #-}

src/SDL/Video/Renderer.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ module SDL.Video.Renderer
2323
, clear
2424
, copy
2525
, copyEx
26-
#ifdef __RECENT_ISH__
26+
#ifdef RECENT_ISH
2727
, copyExF
2828
#endif
2929
, drawLine
@@ -765,7 +765,7 @@ copyEx (Renderer r) (Texture t) srcRect dstRect theta center flips =
765765
V2 x y -> (if x then Raw.SDL_FLIP_HORIZONTAL else 0) .|.
766766
(if y then Raw.SDL_FLIP_VERTICAL else 0))
767767

768-
#ifdef __RECENT_ISH__
768+
#ifdef RECENT_ISH
769769
-- | Copy a portion of the texture to the current rendering target, optionally rotating it by angle around the given center and also flipping it top-bottom and/or left-right.
770770
copyExF :: MonadIO m
771771
=> Renderer -- ^ The rendering context

0 commit comments

Comments
 (0)