Changeset 63298 in vbox for trunk/src/VBox/Frontends/VBoxSDL
- Timestamp:
- Aug 10, 2016 4:35:00 PM (8 years ago)
- Location:
- trunk/src/VBox/Frontends/VBoxSDL
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxSDL/Framebuffer.cpp
r60759 r63298 1 1 /* $Id$ */ 2 2 /** @file 3 * 4 * VBox frontends: VBoxSDL (simple frontend based on SDL): 5 * Implementation of VBoxSDLFB (SDL framebuffer) class 3 * VBoxSDL - Implementation of VBoxSDLFB (SDL framebuffer) class 6 4 */ 7 5 … … 45 43 46 44 #if defined(RT_OS_WINDOWS) || defined(RT_OS_LINUX) 47 #include <SDL_syswm.h> /* for SDL_GetWMInfo() */ 45 # ifdef _MSC_VER 46 # pragma warning(push) 47 # pragma warning(disable: 4121) /* warning C4121: 'SDL_SysWMmsg' : alignment of a member was sensitive to packing*/ 48 # endif 49 # include <SDL_syswm.h> /* for SDL_GetWMInfo() */ 50 # ifdef _MSC_VER 51 # pragma warning(pop) 52 # endif 48 53 #endif 49 54 … … 153 158 #ifdef RT_OS_WINDOWS 154 159 HRESULT hr = CoCreateFreeThreadedMarshaler(this, m_pUnkMarshaler.asOutParam()); 155 Log(("CoCreateFreeThreadedMarshaler hr %08X\n", hr)); 160 Log(("CoCreateFreeThreadedMarshaler hr %08X\n", hr)); NOREF(hr); 156 161 #endif 157 162 … … 561 566 STDMETHODIMP VBoxSDLFB::VideoModeSupported(ULONG width, ULONG height, ULONG bpp, BOOL *supported) 562 567 { 568 RT_NOREF(bpp); 569 563 570 if (!supported) 564 571 return E_POINTER; … … 616 623 STDMETHODIMP VBoxSDLFB::ProcessVHWACommand(BYTE *pCommand) 617 624 { 625 RT_NOREF(pCommand); 618 626 return E_NOTIMPL; 619 627 } … … 621 629 STDMETHODIMP VBoxSDLFB::Notify3DEvent(ULONG uType, ComSafeArrayIn(BYTE, aData)) 622 630 { 631 RT_NOREF(uType, aData); 623 632 return E_NOTIMPL; 624 633 } … … 917 926 SDL_VERSION(&info.version); 918 927 if (SDL_GetWMInfo(&info)) 919 mWinId = ( LONG64) info.window;928 mWinId = (intptr_t) info.window; 920 929 # elif defined (RT_OS_LINUX) 921 930 SDL_SysWMinfo info; … … 1151 1160 1152 1161 #ifdef VBOX_SECURELABEL 1162 1153 1163 /** 1154 1164 * Setup the secure labeling parameters … … 1213 1223 void VBoxSDLFB::paintSecureLabel(int x, int y, int w, int h, bool fForce) 1214 1224 { 1215 #ifdef VBOXSDL_WITH_X11 1225 RT_NOREF(x, w, h); 1226 # ifdef VBOXSDL_WITH_X11 1216 1227 AssertMsg(gSdlNativeThread == RTThreadNativeSelf(), ("Wrong thread! SDL is not threadsafe!\n")); 1217 # endif1228 # endif 1218 1229 /* only when the function is present */ 1219 1230 if (!pTTF_RenderUTF8_Solid) … … 1250 1261 SDL_UpdateRect(mScreen, 0, 0, mScreen->w, mLabelHeight); 1251 1262 } 1263 1252 1264 #endif /* VBOX_SECURELABEL */ 1253 1265 … … 1411 1423 STDMETHODIMP VBoxSDLFBOverlay::COMGETTER(Alpha)(ULONG *alpha) 1412 1424 { 1425 RT_NOREF(alpha); 1413 1426 LogFlow(("VBoxSDLFBOverlay::GetAlpha\n")); 1414 1427 return E_NOTIMPL; … … 1423 1436 STDMETHODIMP VBoxSDLFBOverlay::COMSETTER(Alpha)(ULONG alpha) 1424 1437 { 1438 RT_NOREF(alpha); 1425 1439 LogFlow(("VBoxSDLFBOverlay::SetAlpha\n")); 1426 1440 return E_NOTIMPL; … … 1594 1608 ULONG w, ULONG h, BOOL *finished) 1595 1609 { 1610 RT_NOREF(aScreenId, bytesPerLine, finished); 1596 1611 AssertReturn(pixelFormat == BitmapFormat_BGR, E_INVALIDARG); 1597 1612 AssertReturn(vram == 0, E_INVALIDARG); … … 1623 1638 * Basically, we support anything with 32bpp. 1624 1639 */ 1625 STDMETHODIMP VBoxSDLFBOverlay::VideoModeSupported(ULONG width, ULONG height, ULONG bpp, 1626 BOOL *supported) 1627 { 1640 STDMETHODIMP VBoxSDLFBOverlay::VideoModeSupported(ULONG width, ULONG height, ULONG bpp, BOOL *supported) 1641 { 1642 RT_NOREF(width, height); 1628 1643 if (!supported) 1629 1644 return E_POINTER; -
trunk/src/VBox/Frontends/VBoxSDL/VBoxSDL.cpp
r60865 r63298 46 46 #endif 47 47 48 #ifdef _MSC_VER 49 # pragma warning(push) 50 # pragma warning(disable: 4121) /* warning C4121: 'SDL_SysWMmsg' : alignment of a member was sensitive to packing*/ 51 #endif 48 52 #ifndef RT_OS_DARWIN 49 #include <SDL_syswm.h> /* for SDL_GetWMInfo() */ 53 # include <SDL_syswm.h> /* for SDL_GetWMInfo() */ 54 #endif 55 #ifdef _MSC_VER 56 # pragma warning(pop) 50 57 #endif 51 58 … … 321 328 STDMETHOD(HandleEvent)(VBoxEventType_T aType, IEvent * aEvent) 322 329 { 330 RT_NOREF(aEvent); 323 331 switch (aType) 324 332 { … … 552 560 if (SDL_GetWMInfo(&info)) 553 561 { 554 # if defined(VBOXSDL_WITH_X11)562 # if defined(VBOXSDL_WITH_X11) 555 563 pSWEv->COMSETTER(WinId)((LONG64)info.info.x11.wmwindow); 556 # elif defined(RT_OS_WINDOWS)557 pSWEv->COMSETTER(WinId)(( LONG64)info.window);558 # else564 # elif defined(RT_OS_WINDOWS) 565 pSWEv->COMSETTER(WinId)((intptr_t)info.window); 566 # else 559 567 AssertFailed(); 560 # endif568 # endif 561 569 } 562 570 #endif /* !RT_OS_DARWIN */ … … 741 749 DECLEXPORT(int) TrustedMain(int argc, char **argv, char **envp) 742 750 { 751 RT_NOREF(envp); 743 752 #ifdef RT_OS_WINDOWS 744 753 ATL::CComModule _Module; /* Required internally by ATL (constructor records instance in global variable). */ … … 3669 3678 if (!keycode) 3670 3679 { 3671 # ifdef DEBUG_bird3680 # ifdef DEBUG_bird 3672 3681 RTPrintf("Untranslated: keycode=%#x (%d)\n", keycode, keycode); 3673 # endif3682 # endif 3674 3683 keycode = Keyevent2KeycodeFallback(ev); 3675 3684 } 3676 3685 } 3677 # ifdef DEBUG_bird3686 # ifdef DEBUG_bird 3678 3687 RTPrintf("scancode=%#x -> %#x\n", ev->keysym.scancode, keycode); 3679 # endif3680 3681 #elif RT_OS_OS23688 # endif 3689 3690 #elif defined(RT_OS_OS2) 3682 3691 keycode = Keyevent2KeycodeFallback(ev); 3683 3692 #endif /* RT_OS_DARWIN */ … … 5039 5048 static Uint32 StartupTimer(Uint32 interval, void *param) 5040 5049 { 5050 RT_NOREF(param); 5051 5041 5052 /* post message so we can do something in the startup loop */ 5042 5053 SDL_Event event = {0}; … … 5053 5064 static Uint32 ResizeTimer(Uint32 interval, void *param) 5054 5065 { 5066 RT_NOREF(interval, param); 5067 5055 5068 /* post message so the window is actually resized */ 5056 5069 SDL_Event event = {0}; … … 5067 5080 static Uint32 QuitTimer(Uint32 interval, void *param) 5068 5081 { 5082 RT_NOREF(interval, param); 5083 5069 5084 BOOL fHandled = FALSE; 5070 5085 -
trunk/src/VBox/Frontends/VBoxSDL/VBoxSDL.h
r62493 r63298 24 24 #ifdef RT_OS_WINDOWS /** @todo check why we need to do this on windows. */ 25 25 /* convince SDL to not overload main() */ 26 # define _SDL_main_h26 # define _SDL_main_h 27 27 #endif 28 28 29 /* include this first so Windows.h get's in before our stuff. */ 30 #ifdef _MSC_VER 31 # pragma warning(push) 32 # pragma warning(disable: 4121) /* warning C4121: 'SDL_SysWMmsg' : alignment of a member was sensitive to packing*/ 33 #endif 29 34 #include <SDL.h> 35 #ifdef _MSC_VER 36 # pragma warning(pop) 37 #endif 30 38 31 39 /** custom SDL event for display update handling */
Note:
See TracChangeset
for help on using the changeset viewer.