Changeset 1712


Ignore:
Timestamp:
Aug 10, 2012, 2:15:31 PM (8 years ago)
Author:
sam
Message:

build: split the D3d9 build flags into D3d9 and Xinput for situations where
we want Xinput but not D3D (ie. OpenGL).

Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/build/vs2010/Lol.Core.Rules.props

    r1645 r1712  
    1111      <FloatingPointModel>Fast</FloatingPointModel>
    1212      <AdditionalIncludeDirectories>$(SolutionDir)\..\..\src;$(SolutionDir)\..\..\src\bullet;$(FlexIncludes);$(BtPhysIncludes);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
    13       <AdditionalIncludeDirectories Condition="'$(Platform)'=='Win32'">$(GlIncludes);$(SdlIncludes);$(D3d9Includes);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
    14       <AdditionalIncludeDirectories Condition="'$(Platform)'=='x64'">$(GlIncludes);$(SdlIncludes);$(D3d9Includes);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
     13      <AdditionalIncludeDirectories Condition="'$(Platform)'=='Win32'">$(GlIncludes);$(SdlIncludes);$(D3d9Includes);$(XinputIncludes);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
     14      <AdditionalIncludeDirectories Condition="'$(Platform)'=='x64'">$(GlIncludes);$(SdlIncludes);$(D3d9Includes);$(XinputIncludes);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
    1515      <PreprocessorDefinitions>NOMINMAX;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
    1616      <PreprocessorDefinitions Condition="'$(Platform)'=='Win32'">WIN32;$(Win32Defines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
     
    4444    <Link>
    4545      <!-- FIXME: not for the static library! -->
    46       <AdditionalDependencies Condition="'$(Platform)'=='Win32' Or '$(Platform)'=='x64'">kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;$(SdlDeps);$(GdiDeps);%(AdditionalDependencies)</AdditionalDependencies>
     46      <AdditionalDependencies Condition="'$(Platform)'=='Win32' Or '$(Platform)'=='x64'">kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;$(SdlDeps);$(GdiDeps);$(XinputDeps);%(AdditionalDependencies)</AdditionalDependencies>
    4747      <AdditionalDependencies Condition="'$(UseOpenGL)'=='true' And ('$(Platform)'=='Win32' Or '$(Platform)'=='x64')">$(GlDeps);%(AdditionalDependencies)</AdditionalDependencies>
    4848      <AdditionalDependencies Condition="'$(UseOpenGL)'=='false' And ('$(Platform)'=='Win32' Or '$(Platform)'=='x64')">$(D3d9Deps);%(AdditionalDependencies)</AdditionalDependencies>
     
    5151      <AdditionalLibraryDirectories Condition="'$(Platform)'=='Win32' Or '$(Platform)'=='x64'">$(GlLibs);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
    5252      <AdditionalLibraryDirectories Condition="'$(Platform)'=='Win32' Or '$(Platform)'=='x64'">$(D3d9Libs);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
     53      <AdditionalLibraryDirectories Condition="'$(Platform)'=='Win32' Or '$(Platform)'=='x64'">$(XinputLibs);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
    5354      <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
    5455      <AdditionalDependencies Condition="'$(Configuration)|$(Platform)'=='Debug|Xbox 360'">xapilibd.lib;d3d9d.lib;d3dx9d.lib;xgraphicsd.lib;xboxkrnl.lib;xnetd.lib;xaudiod2.lib;xactd3.lib;x3daudiod.lib;xmcored.lib;xbdm.lib;vcompd.lib;%(AdditionalDependencies)</AdditionalDependencies>
  • trunk/build/vs2010/Lol.Core.Vars.props

    r1654 r1712  
    6262    <D3d9Libs Condition="'$(Platform)'=='Win32'">$(DXSDK_DIR)\Lib\x86</D3d9Libs>
    6363    <D3d9Libs Condition="'$(Platform)'=='x64'">$(DXSDK_DIR)\Lib\x64</D3d9Libs>
    64     <D3d9Deps Condition="'$(Configuration)'=='Release'">d3d9.lib;d3dx9.lib;xinput.lib</D3d9Deps>
    65     <D3d9Deps Condition="'$(Configuration)'=='Debug'">d3d9.lib;d3dx9d.lib;xinput.lib</D3d9Deps>
     64    <D3d9Deps Condition="'$(Configuration)'=='Release'">d3d9.lib;d3dx9.lib</D3d9Deps>
     65    <D3d9Deps Condition="'$(Configuration)'=='Debug'">d3d9.lib;d3dx9d.lib</D3d9Deps>
    6666    <Win32Defines Condition="'$(UseOpenGL)'=='false'">USE_D3D9;$(Win32Defines)</Win32Defines>
     67
     68    <!-- Xinput -->
     69    <XinputIncludes>$(DXSDK_DIR)\Include</XinputIncludes>
     70    <XinputLibs Condition="'$(Platform)'=='Win32'">$(DXSDK_DIR)\Lib\x86</XinputLibs>
     71    <XinputLibs Condition="'$(Platform)'=='x64'">$(DXSDK_DIR)\Lib\x64</XinputLibs>
     72    <XinputDeps>xinput.lib</XinputDeps>
     73    <Win32Defines>USE_XINPUT;$(Win32Defines)</Win32Defines>
    6774
    6875    <!-- PS3-specific -->
     
    105112    <BuildMacro Include="D3d9Libs"><Value>$(D3d9Libs)</Value></BuildMacro>
    106113    <BuildMacro Include="D3d9Deps"><Value>$(D3d9Deps)</Value></BuildMacro>
     114    <BuildMacro Include="XinputIncludes"><Value>$(XinputIncludes)</Value></BuildMacro>
     115    <BuildMacro Include="XinputLibs"><Value>$(XinputLibs)</Value></BuildMacro>
     116    <BuildMacro Include="XinputDeps"><Value>$(XinputDeps)</Value></BuildMacro>
    107117    <BuildMacro Include="Win32Defines"><Value>$(Win32Defines)</Value></BuildMacro>
    108118    <BuildMacro Include="XboxDefines"><Value>$(XboxDefines)</Value></BuildMacro>
  • trunk/src/platform/d3d9/d3d9input.cpp

    r1394 r1712  
    1313#endif
    1414
    15 #if defined USE_D3D9
     15#if defined USE_XINPUT
    1616#   include <d3d9.h>
    1717#   include <xinput.h>
     
    3333
    3434private:
    35 #if defined USE_D3D9
     35#if defined USE_XINPUT
    3636    Array<int, Stick *> m_joysticks;
    3737#endif
     
    4545  : m_data(new D3d9InputData())
    4646{
    47 #if defined USE_D3D9
     47#if defined USE_XINPUT
    4848    for (int i = 0; i < XUSER_MAX_COUNT; i++)
    4949    {
     
    6464D3d9Input::~D3d9Input()
    6565{
    66 #if defined USE_D3D9
     66#if defined USE_XINPUT
    6767    /* Unregister all the joysticks we added */
    6868    while (m_data->m_joysticks.Count())
     
    8484    Entity::TickDraw(seconds);
    8585
    86 #if defined USE_D3D9
     86#if defined USE_XINPUT
    8787    for (int i = 0; i < m_data->m_joysticks.Count(); i++)
    8888    {
  • trunk/src/platform/sdl/sdlapp.cpp

    r1691 r1712  
    2929#include "platform/sdl/sdlapp.h"
    3030#include "platform/sdl/sdlinput.h"
    31 #if defined USE_D3D9
     31#if defined USE_XINPUT
    3232#   include "platform/d3d9/d3d9input.h"
    3333#endif
     
    9494
    9595    /* Autoreleased objects */
    96 #   if defined USE_D3D9
     96#   if defined USE_XINPUT
    9797    /* Prefer D3d9 for joysticks on Windows, because the X360 pads are not
    9898     * advertised with the proper number of axes. */
  • trunk/src/platform/sdl/sdlinput.cpp

    r1709 r1712  
    7070        SDL_Joystick *sdlstick = SDL_JoystickOpen(i);
    7171
    72         /* Blacklist HDAPS, it's not a real joystick */
     72        /* Blacklist some devices:
     73         *  - HDAPS, it's not a real joystick.
     74         *  - X360 controllers, Xinput handles them better since
     75         *    it won't think there is only one trigger axis. */
    7376        char const *name = SDL_JoystickName(i);
    7477        if (strstr(name, "HDAPS")
    75 #   if !defined USE_D3D9
     78#   if defined USE_XINPUT
    7679             || strstr(name, "XBOX 360 For Windows")
    7780#   endif
Note: See TracChangeset for help on using the changeset viewer.