User Profile

Collapse

Profile Sidebar

Collapse
Damien582
Damien582
Last Activity: Nov 16 '09, 01:17 AM
Joined: Aug 1 '08
Location: Hawaii
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Damien582
    replied to Closing Blocked Thread
    Well I've found a solution that is at least more satisfactory. I rewrote my Reader class to be intstance based rather than a static class, and instead of running in a separate looped thread, I do an async read on the device, then close/open the device again, and run the read function again from my callback:

    private void Listen()
    {
    device.Read(new HidDevice.ReadC allback(OnDataR eceived));
    }...
    See more | Go to post

    Leave a comment:


  • Damien582
    replied to Closing Blocked Thread
    Thread.Abort() does not work, as the library is waiting for input from the usb device before finishing the threadstart. If I try to close the app, then press a button on the remote, it works fine. However this is not exactly preferred. I even tried setting the thread to background, but no joy.
    See more | Go to post

    Leave a comment:


  • Damien582
    started a topic Closing Blocked Thread

    Closing Blocked Thread

    Hi everyone,

    I am working with a library (HIDLibrary) to read from and hid device (eHome Infraread Transceiver, aka Windows Media Center Remote) to read from a universal remote control. The library functions perfectly, even with other devices. However, my problem lies in the fact that I am running my polling function in another thread, as the library's read function blocks the thread until input is received. While my app is running,...
    See more | Go to post

  • Damien582
    replied to Looping Through CurrentJoystickState
    in .NET
    Thanks mldisibio for the info. I will definately look back into that as although my class works very fast in a test console app, using it in an XNA game tends to be very irregular and slow at times. It works better actually just checking the states of the selected axes and buttons versus using events to notify the game. When I get this perfected I will post the code for anyone else interested.
    See more | Go to post

    Leave a comment:


  • Damien582
    replied to Looping Through CurrentJoystickState
    in .NET
    I forgot to mention my GamePad class has events for every property checked, including buttonDown,butt onPressed,stick Moved, sliderMoved, etc... It runs in a separate thread so apps run smoothly.
    See more | Go to post

    Leave a comment:


  • Damien582
    replied to Looping Through CurrentJoystickState
    in .NET
    Nevermind, I made an enum of all 24 joystick axes and manaually checked each one on each poll. It's a lot of coding, but it works and pretty fast. If anyone is interested in the code for this class drop me a line and I will be glad to give it to you. I am trying to incorporate every property in joystickstate, including all pov hats, axes, buttons, and sliders, so any hid controller or joystick should work. I have already tested it with xbox and...
    See more | Go to post

    Leave a comment:


  • Damien582
    started a topic Looping Through CurrentJoystickState
    in .NET

    Looping Through CurrentJoystickState

    I am writing a wrapper class for xna to use generic gamepads and joysticks through directinput. My question is not pertaining to dx or xna but rather how to get property names as a string and their corresponding value from an object. The CurrentJoystick State object has int properties for 24 different axes and various int[] procedures for other information. The axis properties have a ToString() function, but this only returns the int value as a string....
    See more | Go to post

  • I am using a Class (Editor) to encapsulate the data structure and sizing functions. The array is of a custom structure Tile{int Layer,int x,int y, int Width, int Height,int TextureId}
    These are to represent tiles in a multi-layer 2d tile based game. Rather than serialize an object I would prefer to keep the structure as simple as possible to reduce file size when saved....
    See more | Go to post

    Leave a comment:


  • What is the best method to resize 3 dimension array in C#?

    Hi guys, new here. I've used this site for a while researching answers, but this is my first post. I've searched everywhere and I haven't found an answer that works. First, what I am doing: Cubed array (3 dimesions, not jagged) of a custom structure for a game I am making to hold tile information. I can resize a 2 dimensional layer just fine, but upon resizing a 3 dimensional array (via creating new array and using Array.Copy) I could not figure...
    See more | Go to post
No activity results to display
Show More
Working...