File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -339,19 +339,15 @@ bool VideoSDL2::MessageLoop()
339339 case SDL_QUIT : return false ;
340340 case SDL_WINDOWEVENT :
341341 {
342- switch (ev.window .event )
342+ if (ev.window .event == SDL_WINDOWEVENT_RESIZED )
343343 {
344- case SDL_WINDOWEVENT_RESIZED :
344+ UpdateCurrentDisplayMode ();
345+ VideoMode newSize (ev.window .data1 , ev.window .data2 );
346+ if (newSize != GetWindowSize ())
345347 {
346- UpdateCurrentDisplayMode ();
347- VideoMode newSize (ev.window .data1 , ev.window .data2 );
348- if (newSize != GetWindowSize ())
349- {
350- UpdateCurrentSizes ();
351- CallBack->WindowResized ();
352- }
348+ UpdateCurrentSizes ();
349+ CallBack->WindowResized ();
353350 }
354- break ;
355351 }
356352 }
357353 break ;
Original file line number Diff line number Diff line change @@ -88,7 +88,7 @@ void WaitForEnter()
8888 if (waited)
8989 return ;
9090 waited = true ;
91- bnw::cout << " \n\n Press ENTER to close this window . . ." << std::endl ;
91+ bnw::cerr << " \n\n Press ENTER to close this window . . .\n " ;
9292 bnw::cin.clear ();
9393 bnw::cin.ignore (std::numeric_limits<std::streamsize>::max (), ' \n ' );
9494 bnw::cin.get ();
@@ -244,39 +244,12 @@ void InstallSignalHandlers()
244244#endif // _MSC_VER
245245}
246246
247- void UninstallSignalHandlers ()
248- {
249- #ifdef _WIN32
250- SetConsoleCtrlHandler (ConsoleSignalHandler, FALSE );
251- #else
252- struct sigaction sa;
253- sa.sa_handler = SIG_DFL ;
254- sa.sa_flags = 0 ; // SA_RESTART would not allow to interrupt connect call;
255- sigemptyset (&sa.sa_mask );
256-
257- sigaction (SIGINT , &sa, nullptr );
258- sigaction (SIGPIPE , &sa, nullptr );
259- sigaction (SIGALRM , &sa, nullptr );
260- #endif // _WIN32
261-
262- #ifdef _MSC_VER
263- SetUnhandledExceptionFilter (nullptr );
264- #else
265- signal (SIGSEGV , SIG_DFL );
266- #endif
267- }
268-
269247/* *
270248 * Exit-Handler, wird bei @p exit ausgeführt.
271249 */
272250void ExitHandler ()
273251{
274252 Socket::Shutdown ();
275- UninstallSignalHandlers ();
276-
277- #ifdef _DEBUG
278- WaitForEnter ();
279- #endif
280253}
281254
282255void SetAppSymbol ()
Original file line number Diff line number Diff line change @@ -37,9 +37,9 @@ void ConsoleSignalHandler(int sig)
3737 if (sig == SIGINT )
3838 {
3939 if (!killme)
40- boost::nowide::cout << " Do you really want to terminate the program (y/n) : " << std::flush ;
40+ boost::nowide::cerr << " Do you really want to terminate the program (y/n) : " ;
4141 else
42- boost::nowide::cout << " Do you really want to kill the program (y/n) : " << std::flush ;
42+ boost::nowide::cerr << " Do you really want to kill the program (y/n) : " ;
4343
4444 int c = getchar ();
4545 if (c == ' j' || c == ' y' || c == 1079565930 )
You can’t perform that action at this time.
0 commit comments