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 - blojayble

Pages: [1]
1
General / String iterators incompatibile
« on: August 30, 2013, 10:22:02 pm »
Hi.

I was making my SFML app, and everything was all right when i compiled it in release mode, but when I tried debug, an weird error occurred. It shows when app is already working and refers to xstring file:

Program: C:\Windows\system32\MSVCP110D.dll
File: D:\programmes\visual-studio-2012\VC\INCLUDE\xstring
Line: 250

Expression: string iterators incompatible
 

By debugging I found what triggers that error:

void ThreadedRenderWin::create_(sf::VideoMode mode_, const std::string& title_, unsigned long style_, const sf::ContextSettings& settings_)
        {
                eventThread.reset(new sf::Thread([&]()
                {
                        sf::Lock createLock(createMutex);
                        sf::RenderWindow::create(mode_, title_, style_, settings_); //<-- This is the problematic function
                        setActive(false);
                       
                //Rest omitted
                }));
                eventThread->launch();
        }

//////main.cpp

int main(){
        NG::ThreadedRenderWin RenderWin;
        RenderWin.create_(sf::VideoMode(800,680,32), "SFML");
       

//Event loop etc.


        return 0;
}
 


Still, in release there is no problem.
I don't know what is exactly wrong, so I put it in "General" category.

Any ideas? I use VS2012.

Thanks for every response!

2
General / Using events with WinAPI.
« on: October 31, 2011, 04:11:30 pm »
Hi all.


I have searched, but I still don't know it. Does events work if I use WinAPI like this:

http://www.sfml-dev.org/tutorials/1.6/graphics-win32.php  ?


If yes, how to do it? I tried by .GetEvent(Event) and

if( Event.Key.Code == sf::Key::A ) do something;

and it doesn't work. Maybe I placed it in wrong place...


I don't need a complete code,  just how to make it working. ;)



Thanks a lot for all answers.

Pages: [1]
anything