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.


Topics - Caeous

Pages: [1]
1
Window / DInput crash during pollEvent
« on: October 22, 2013, 03:13:38 pm »
Hello everyone,

I'm experiencing a weird crash while running a very simple SFML application. Here is the code below:

#include "stdafx.h"

#include <SFML\Graphics.hpp>
#include <SFML\OpenGL.hpp>
#include <SFML\System.hpp>
#include <SFML\Window.hpp>

int main(int argc, char *argv[])
{
   sf::RenderWindow window;
   window.create( sf::VideoMode( 800, 600 ), "SFML", sf::Style::Default );
   window.setFramerateLimit( 60 );

   sf::Event event;
   while( window.isOpen() )
   {
      window.pollEvent( event );
   }

   return 0;
}

This crash occurs on both SFML 2.1 and the latest Unofficial Nightly Build (2013-09-24) running Windows 7 32bit. I've managed to get the crash while debugging, and here is the callstack:

dinput.dll!_CJoyCfg_New@12()   Unknown
dinput.dll!_StringCbCopyW@12() Unknown
dinput.dll!_hresDupPtszPptsz@8()       Unknown
dinput.dll!_CHid_Init@8()      Unknown
dinput.dll!_CHid_New@16()      Unknown
dinput.dll!_DIWdm_JoyHidMapping@16()   Unknown
dinput.dll!_JoyReg_GetConfigInternal@16()      Unknown
dinput.dll!_JoyReg_GetConfig@16()      Unknown
dinput.dll!_CJoyCfg_GetConfig@16()     Unknown
winmm.dll!_joyOpen@8() Unknown
winmm.dll!_joyGetPosEx@8()     Unknown
sfml-window-d-2.dll!0f9c941d()  Unknown
[Frames below may be incorrect and/or missing, no symbols loaded for sfml-window-d-2.dll]      
sfml-window-d-2.dll!sf::Joystick::operator=() + 482 bytes       Unknown
sfml-window-d-2.dll!sf::Window::initialize() + 5176 bytes       Unknown
sfml-window-d-2.dll!sf::Window::initialize() + 4581 bytes       Unknown
sfml-window-d-2.dll!sf::Window::pollEvent() + 40 bytes  Unknown
ConsoleApplication2.exe!main(int argc, char * * argv) Line 44   C++
ConsoleApplication2.exe!__tmainCRTStartup() Line 536    C
ConsoleApplication2.exe!mainCRTStartup() Line 377       C
kernel32.dll!@BaseThreadInitThunk@12() Unknown
ntdll.dll!___RtlUserThreadStart@8()    Unknown
ntdll.dll!__RtlUserThreadStart@8()     Unknown
 

To reproduce the bug, I just run the application and let it sit for 5-30 minutes and then the crash will occur.

Any ideas?

2
Window / Black window icon through Remote Desktop
« on: October 15, 2013, 03:25:40 pm »
Hello everyone,

I'm getting an issue where if you remote desktop to a Windows XP computer and launch an SFML window with a custom icon loaded, it'll be all black. If you remote desktop from XP to Win 7, the icon is fine.

Here's the code used:

sf::Image icon_bmp;
if( icon_bmp.loadFromFile( path ) )
{
   sf::Vector2u icon_bmp_size = icon_bmp.getSize();
   icon_bmp.createMaskFromColor( sf::Color( 255, 0, 255 ) ); // have tried using with and without
   this->window.setIcon( icon_bmp_size.x, icon_bmp_size.y, icon_bmp.getPixelsPtr() );
}
 

Any ideas?

3
Window / Ctrl+Pause key event has Key::Unknown code
« on: October 11, 2013, 09:28:22 pm »
Hello,

I've noticed that specifically the combination of Ctrl+Pause will not give a code of Key::Pause but rather Key::Unknown.

Alt+Pause generates the appropriate Key::Pause code.

Any ideas?

4
Window / Clear Keyboard Events in buffer
« on: October 07, 2013, 02:43:08 pm »
Hello everyone,

I'm trying to replicate the functionality of FlushConsoleInputBuffer (for Console apps), and SDL_PeekEvent (with SDL_GETEVENT). They both give the ability to remove specific events from the queue.

This is useful is cases where the time it takes to process an event is much slower than the time it takes for the user to create an event. Example: Scrolling down a list with the keyboard arrows, if the user presses the keyboard too often - or through keyboard repeat - then the list will try to continue to scroll when it reaches the end, and you have to wait until all the events are done before you can do anything. In this case I'd like to clear the keyboard event buffer so that when the end of the list is reached the user can continue producing events.

I don't think I saw the ability to do this in SFML? Are there plans to introduce it? Are there any ways that I can do this?

Thanks guys,
Marc

Pages: [1]
anything