Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - TestSubject06

Pages: [1]
1
Window / Re: SFML 2.0 Joystick Identification
« on: August 11, 2014, 10:09:54 pm »
Well I actually planned on putting the platform specific code in some #if stuff, that way when it's built for not-windows it would just use SFML for all of the controllers. I don't 100% know how that works yet, or if it will continue to properly support XInput devices on other platforms. (They aren't officially supported on those platforms anyways, so I can't be too worried about it if there's undefined or incorrect behavior.)

And yes, Vendor ID and Product ID should be exactly what I need.

2
Window / Re: SFML 2.0 Joystick Identification
« on: August 11, 2014, 09:39:45 pm »
I've been attempting to update to it, but I've got all sorts of entry point errors in dlls. Font rendering issues, ugh.

3
Window / Re: SFML 2.0 Joystick Identification
« on: August 11, 2014, 09:32:13 pm »
Because by default in SFML 2.0, it APPEARS (I haven't dug too deeply) that the default behavior on windows is to use DirectInput. And while DirectInput is compatable with XInput devices, the triggers register as a single axis, one in the negative direction, and one in the positive direction. This was apparently by design on Microsoft's end, for whatever reason. SFML's (in version 2.0) built in code works perfectly fine for devices that aren't XInput devices.

http://msdn.microsoft.com/en-us/library/windows/desktop/ee417014(v=vs.85).aspx

(Regardless of whether it uses DirectInput internally on a windows machine or not, the behavior is wrong by default, so I want to use XInput where appropriate.)

4
Window / Re: SFML 2.0 Joystick Identification
« on: August 11, 2014, 09:16:43 pm »
An XInput device is a controller that is designed for use with the DirectX XInput driver. 'The other devices' are legacy devices that are not designed for use with the XInput driver.

Running a loop of sf::Joystick::isConnected(index) will get me up to 8 supported game controller devices. Running a loop of
bool isXInputControllerConnected(int _index){
   XINPUT_STATE state;
   ZeroMemory(&state, sizeof(XINPUT_STATE));
   DWORD result = XInputGetState(_index, &state);
   if(result == ERROR_SUCCESS){
      return true;
   }
}
will return a list of connected XInput devices. The problem I'm having is that those devices in the XInput list are also in SFML's Joystick list. I have no way to determine if a controller in the XInput device list and a controller in SFML's list are the same controller. I want to use XInput if a controller is compatable, but fall back on legacy support if it is not. The reason for this is because legacy drivers don't allow Xbox 360 controller triggers to properly be independent, which is super lame.

5
Window / SFML 2.0 Joystick Identification
« on: August 11, 2014, 05:42:16 pm »
My project is still using SFML 2.0, and I was wondering if there was a way to identify if a joystick that's connected is an XInput device. I can poll all of the XInput devices, and all of the other devices, but I can't find any way to make a connection so that they aren't counted as separate devices.

6
General / Re: Unresolved Symbols
« on: April 27, 2012, 03:01:46 pm »
Yeah, sorry... I switched over to 2.0 when a few of my friends told me about the ATI bug. Everything went smooth from there. Thanks for your help though.

7
General / Re: Unresolved Symbols
« on: April 27, 2012, 02:22:02 am »
okay wow, nevermind I was missing some lines in the Linker->Input->Additional Dependencies. The setup page only mentioned sfml-system.lib which would explain why the system example worked fine.

Now it compiles, but when I run it it does nothing. No window is created, no errors are thrown, nothing happens.
Code: [Select]
#include <SFML/Window.hpp>
#include <iostream>

int main()
{
    std::cout<<"stuff1";
    // Create the main window
    sf::Window App(sf::VideoMode(800, 600, 32), "SFML Window");
std::cout<<"stuff2";

    // Start main loop
    bool Running = true;
    while (Running)
    {
        //App.Display();
std::cout<<"stuff";
    }
    std::cout<<"stuff3";
    return EXIT_SUCCESS;
}
never even outputs "stuff1"

Without the sf::Window App ... it does all of the cout stuff.

Edit: stuff in the System and Audio sections seem to work fine for me, but as soon as I try to even make a reference to the Window class it just hangs.

If it matters I have a Radeon HD 6870 gfx card.

8
General / Unresolved Symbols
« on: April 27, 2012, 01:51:29 am »
Building and running the Threads example works fine, but when I move on to the Window example I get some very strange and obscure compiler errors.
Code: [Select]
#include <SFML/Window.hpp>

int main()
{
    // Create the main window
    sf::Window App(sf::VideoMode(800, 600, 32), "SFML Window");

    // Start main loop
    bool Running = true;
    while (Running)
    {
        App.Display();
    }

    return EXIT_SUCCESS;
}
results in:
Code: [Select]
Error 6 error LNK1120: 5 unresolved externals C:\Users\Zack\Documents\My Dropbox\Private\VisualStudio\SFML_Test\Debug\SFML_Test.exe SFML_Test
Error 4 error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall sf::VideoMode::VideoMode(unsigned int,unsigned int,unsigned int)" (__imp_??0VideoMode@sf@@QAE@III@Z) referenced in function _main C:\Users\Zack\Documents\My Dropbox\Private\VisualStudio\SFML_Test\SFML_Test\SFML_Test.obj SFML_Test
Error 3 error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall sf::Window::Window(class sf::VideoMode,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,unsigned long,struct sf::WindowSettings const &)" (__imp_??0Window@sf@@QAE@VVideoMode@1@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@KABUWindowSettings@1@@Z) referenced in function _main C:\Users\Zack\Documents\My Dropbox\Private\VisualStudio\SFML_Test\SFML_Test\SFML_Test.obj SFML_Test
Error 1 error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall sf::Window::~Window(void)" (__imp_??1Window@sf@@UAE@XZ) referenced in function _main C:\Users\Zack\Documents\My Dropbox\Private\VisualStudio\SFML_Test\SFML_Test\SFML_Test.obj SFML_Test
Error 2 error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall sf::Window::Display(void)" (__imp_?Display@Window@sf@@QAEXXZ) referenced in function _main C:\Users\Zack\Documents\My Dropbox\Private\VisualStudio\SFML_Test\SFML_Test\SFML_Test.obj SFML_Test

I'm using Windows 7 64 bit, with Visual Studio 2010. When I build SFML I seem to be missing some files:
Code: [Select]
sfml-audio.lib
sfml-audio-d.lib
sfml-graphics.lib
sfml-graphics-d.lib
sfml-network.lib
sfml-network-d.lib
sfml-system.lib
sfml-system-d.lib
So I just left the original ones in there (from the VC2008 build) and it seemed to work fine. At least the stuff in system example didn't mind.

Any ideas?

Pages: [1]
anything