Files @ r24845:fab6f86c6617
Branch filter:

Location: cpp/openttd-patchpack/source/cmake/Endian.cmake

Patric Stout
Fix: [Win32] now we are drawing on a tick, no longer use WM_PAINT

WM_PAINT hits when-ever Windows feels like, but always after we
marked the screen as dirty. In result, it was lagging behind,
giving a sub-60fps experience.

With the new draw-tick there is no longer a need to be driven by
WM_PAINT, so it is better anyway to drive the drawing ourself. As
an added bonus this makes the win32 driver more like the others.
# Add the definitions to indicate which endian we are building for.
#
# add_endian_definition()
#
function(add_endian_definition)
    include(TestBigEndian)
    TEST_BIG_ENDIAN(IS_BIG_ENDIAN)

    if(IS_BIG_ENDIAN)
        add_definitions(-DTTD_ENDIAN=TTD_BIG_ENDIAN)
    else()
        add_definitions(-DTTD_ENDIAN=TTD_LITTLE_ENDIAN)
    endif()
endfunction()