diff options
author | Hubert Jarosz <marqin.pl@gmail.com> | 2016-03-09 00:00:52 +0100 |
---|---|---|
committer | Hubert Jarosz <marqin.pl@gmail.com> | 2016-03-09 00:00:52 +0100 |
commit | 4a4f2479146aa33e235ed57cde311efda68d3c8f (patch) | |
tree | cf91f2869ff8f058c6682569fb31e22e5ee736ad /platform/windows/os_windows.cpp | |
parent | 1dad6eca812e5c2e313b54265114de8a1d73d999 (diff) |
remove trailing whitespace
Diffstat (limited to 'platform/windows/os_windows.cpp')
-rw-r--r-- | platform/windows/os_windows.cpp | 64 |
1 files changed, 32 insertions, 32 deletions
diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp index 95a6a6ac58..cad14430e6 100644 --- a/platform/windows/os_windows.cpp +++ b/platform/windows/os_windows.cpp @@ -178,9 +178,9 @@ void OS_Windows::initialize_core() { maximized=false; minimized=false; - ThreadWindows::make_default(); - SemaphoreWindows::make_default(); - MutexWindows::make_default(); + ThreadWindows::make_default(); + SemaphoreWindows::make_default(); + MutexWindows::make_default(); FileAccess::make_default<FileAccessWindows>(FileAccess::ACCESS_RESOURCES); FileAccess::make_default<FileAccessWindows>(FileAccess::ACCESS_USERDATA); @@ -193,7 +193,7 @@ void OS_Windows::initialize_core() { TCPServerWinsock::make_default(); StreamPeerWinsock::make_default(); PacketPeerUDPWinsock::make_default(); - + mempool_static = new MemoryPoolStaticMalloc; #if 1 mempool_dynamic = memnew( MemoryPoolDynamicStatic ); @@ -203,7 +203,7 @@ void OS_Windows::initialize_core() { mempool_dynamic = memnew( MemoryPoolDynamicPrealloc(buffer,DYNPOOL_SIZE) ); #endif - + // We need to know how often the clock is updated if( !QueryPerformanceFrequency((LARGE_INTEGER *)&ticks_per_second) ) ticks_per_second = 1000; @@ -426,7 +426,7 @@ LRESULT OS_Windows::WndProc(HWND hWnd,UINT uMsg, WPARAM wParam, LPARAM lParam) { if (main_loop) input->parse_input_event(event); - + } break; case WM_LBUTTONDOWN: @@ -476,7 +476,7 @@ LRESULT OS_Windows::WndProc(HWND hWnd,UINT uMsg, WPARAM wParam, LPARAM lParam) { } break; case WM_MBUTTONUP: { mb.pressed=false; - mb.button_index=3; + mb.button_index=3; } break; case WM_RBUTTONDOWN: { mb.pressed=true; @@ -551,7 +551,7 @@ LRESULT OS_Windows::WndProc(HWND hWnd,UINT uMsg, WPARAM wParam, LPARAM lParam) { mb.button_mask|=(wParam&MK_XBUTTON1)?(1<<5):0; mb.button_mask|=(wParam&MK_XBUTTON2)?(1<<6):0;*/ mb.x=GET_X_LPARAM(lParam); - mb.y=GET_Y_LPARAM(lParam); + mb.y=GET_Y_LPARAM(lParam); if (mouse_mode==MOUSE_MODE_CAPTURED) { @@ -822,11 +822,11 @@ void OS_Windows::initialize(const VideoMode& p_desired,int p_video_driver,int p_ outside=true; WNDCLASSEXW wc; - + video_mode=p_desired; //printf("**************** desired %s, mode %s\n", p_desired.fullscreen?"true":"false", video_mode.fullscreen?"true":"false"); RECT WindowRect; - + WindowRect.left=0; WindowRect.right=video_mode.width; WindowRect.top=0; @@ -840,18 +840,18 @@ void OS_Windows::initialize(const VideoMode& p_desired,int p_video_driver,int p_ wc.cbWndExtra= 0; //wc.hInstance = hInstance; wc.hInstance = godot_hinstance ? godot_hinstance : GetModuleHandle(NULL); - wc.hIcon = LoadIcon(NULL, IDI_WINLOGO); + wc.hIcon = LoadIcon(NULL, IDI_WINLOGO); wc.hCursor = NULL;//LoadCursor(NULL, IDC_ARROW); wc.hbrBackground = NULL; - wc.lpszMenuName = NULL; + wc.lpszMenuName = NULL; wc.lpszClassName = L"Engine"; if (!RegisterClassExW(&wc)) { MessageBox(NULL,"Failed To Register The Window Class.","ERROR",MB_OK|MB_ICONEXCLAMATION); - return; // Return + return; // Return } - - + + EnumDisplayMonitors(NULL,NULL,MonitorEnumProc,0); print_line("DETECTED MONITORS: "+itos(monitor_info.size())); @@ -861,7 +861,7 @@ void OS_Windows::initialize(const VideoMode& p_desired,int p_video_driver,int p_ DEVMODE current; memset(¤t,0,sizeof(current)); EnumDisplaySettings(NULL, ENUM_CURRENT_SETTINGS, ¤t); - + WindowRect.right = current.dmPelsWidth; WindowRect.bottom = current.dmPelsHeight; @@ -888,7 +888,7 @@ void OS_Windows::initialize(const VideoMode& p_desired,int p_video_driver,int p_ dwExStyle=WS_EX_APPWINDOW; dwStyle=WS_POPUP; - + } else { dwExStyle=WS_EX_APPWINDOW | WS_EX_WINDOWEDGE; dwStyle=WS_OVERLAPPEDWINDOW; @@ -937,7 +937,7 @@ void OS_Windows::initialize(const VideoMode& p_desired,int p_video_driver,int p_ }; - + #if defined(OPENGL_ENABLED) || defined(GLES2_ENABLED) || defined(LEGACYGL_ENABLED) gl_context = memnew( ContextGL_Win(hWnd,false) ); gl_context->initialize(); @@ -981,7 +981,7 @@ void OS_Windows::initialize(const VideoMode& p_desired,int p_video_driver,int p_ */ - visual_server->init(); + visual_server->init(); input = memnew( InputDefault ); joystick = memnew (joystick_windows(input, &hWnd)); @@ -1280,7 +1280,7 @@ OS::VideoMode OS_Windows::get_video_mode(int p_screen) const { } void OS_Windows::get_fullscreen_mode_list(List<VideoMode> *p_list,int p_screen) const { - + } int OS_Windows::get_screen_count() const { @@ -1714,18 +1714,18 @@ void OS_Windows::delay_usec(uint32_t p_usec) const { Sleep(1); else Sleep(p_usec / 1000); - + } uint64_t OS_Windows::get_ticks_usec() const { uint64_t ticks; - uint64_t time; + uint64_t time; // This is the number of clock ticks since start if( !QueryPerformanceCounter((LARGE_INTEGER *)&ticks) ) ticks = (UINT64)timeGetTime(); // Divide by frequency to get the time in seconds time = ticks * 1000000L / ticks_per_second; - // Subtract the time at game start to get + // Subtract the time at game start to get // the time since the game started time -= ticks_start; return time; @@ -1737,13 +1737,13 @@ void OS_Windows::process_events() { MSG msg; last_id = joystick->process_joysticks(last_id); - + while(PeekMessageW(&msg,NULL,0,0,PM_REMOVE)) { TranslateMessage(&msg); DispatchMessageW(&msg); - + } process_key_events(); @@ -2034,21 +2034,21 @@ void OS_Windows::run() { if (!main_loop) return; - + main_loop->init(); - + uint64_t last_ticks=get_ticks_usec(); - + int frames=0; uint64_t frame=0; - + while (!force_quit) { - + process_events(); // get rid of pending events if (Main::iteration()==true) break; }; - + main_loop->finish(); } @@ -2156,7 +2156,7 @@ OS_Windows::OS_Windows(HINSTANCE _hInstance) { } -OS_Windows::~OS_Windows() +OS_Windows::~OS_Windows() { #ifdef STDOUT_FILE fclose(stdo); |