Changeset 98246 in vbox for trunk/src/VBox/Frontends/VBoxSDL
- Timestamp:
- Jan 23, 2023 2:44:08 PM (2 years ago)
- Location:
- trunk/src/VBox/Frontends/VBoxSDL
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxSDL/Framebuffer.cpp
r98103 r98246 773 773 else 774 774 { 775 mSurfVRAM = SDL_CreateRGBSurface(SDL_SWSURFACE, mGuestXRes, mGuestYRes, mBitsPerPixel,775 mSurfVRAM = SDL_CreateRGBSurface(SDL_SWSURFACE, mGuestXRes, mGuestYRes, 32, 776 776 Rmask, Gmask, Bmask, Amask); 777 777 LogFlow(("VBoxSDL:: using SDL_SWSURFACE\n")); … … 1089 1089 RTCritSectEnter(&mUpdateLock); 1090 1090 Log(("Updates %d, %d,%d %dx%d\n", mfUpdates, x, y, w, h)); 1091 // printf("Updates %d, %d,%d %dx%d\n", mfUpdates, x, y, w, h); 1091 1092 if (!mfUpdates) 1092 1093 { … … 1160 1161 dstRect.h = RT_MAX(0, h - yCutoffGuest); 1161 1162 1163 1164 /* hardware surfaces don't need update notifications */ 1165 #if defined(VBOX_WITH_SDL2) 1166 AssertRelease(mScreen->flags & SDL_PREALLOC); 1167 SDL_Texture *pNewTexture = SDL_CreateTextureFromSurface(mpRenderer, mSurfVRAM); 1168 /** @todo Do we need to update the dirty rect for the texture for SDL2 here as well? */ 1169 //SDL_RenderClear(mpRenderer); 1170 SDL_RenderCopy(mpRenderer, pNewTexture, &srcRect, &dstRect); 1171 SDL_RenderPresent(mpRenderer); 1172 SDL_DestroyTexture(pNewTexture); 1173 #else 1162 1174 /* 1163 1175 * Now we just blit 1164 1176 */ 1165 1177 SDL_BlitSurface(mSurfVRAM, &srcRect, mScreen, &dstRect); 1166 /* hardware surfaces don't need update notifications */1167 #if defined(VBOX_WITH_SDL2)1168 AssertRelease(mScreen->flags & SDL_PREALLOC);1169 /** @todo Do we need to update the dirty rect for the texture for SDL2 here as well? */1170 SDL_RenderClear(mpRenderer);1171 SDL_RenderCopy(mpRenderer, mpTexture, &dstRect, &dstRect);1172 SDL_RenderPresent(mpRenderer);1173 #else1174 1178 if ((mScreen->flags & SDL_HWSURFACE) == 0) 1175 1179 SDL_UpdateRect(mScreen, dstRect.x, dstRect.y, dstRect.w, dstRect.h); -
trunk/src/VBox/Frontends/VBoxSDL/Makefile.kmk
r98188 r98246 127 127 # tstSDL 128 128 # 129 ifndef VBOX_WITH_SDL2 129 130 PROGRAMS += tstSDL 130 131 tstSDL_TEMPLATE = VBoxR3TstExe … … 140 141 tstSDL_DEFS.linux = VBOX_OPENGL 141 142 endif 143 142 144 143 145 tstSDL_LIBS = \ … … 158 160 tstSDL_LDFLAGS.darwin = \ 159 161 -framework Foundation -framework AppKit 160 162 endif 161 163 ## @todo What was this stuff doing here? The exception config is saying two different things, and why just -O for release builds? 162 164 #tstSDL_CXXFLAGS.win = \ -
trunk/src/VBox/Frontends/VBoxSDL/VBoxSDL.cpp
r98103 r98246 596 596 { 597 597 # if defined(VBOXSDL_WITH_X11) 598 # ifdef VBOX_WITH_SDL2 599 pSWEv->COMSETTER(WinId)((LONG64)info.info.x11.window); 600 # else 598 601 pSWEv->COMSETTER(WinId)((LONG64)info.info.x11.wmwindow); 602 # endif 599 603 # elif defined(RT_OS_WINDOWS) 600 604 # ifdef VBOX_WITH_SDL2 … … 811 815 */ 812 816 { 817 #ifndef VBOX_WITH_SDL2 813 818 const SDL_version *pVersion = SDL_Linked_Version(); 814 819 if ( SDL_VERSIONNUM(pVersion->major, pVersion->minor, pVersion->patch) 815 820 < SDL_VERSIONNUM(1, 2, 14)) 816 821 RTEnvSet("SDL_DISABLE_LOCK_KEYS", "1"); 822 #endif 817 823 } 818 824 #endif … … 3410 3416 case SDLK_RSHIFT: return 0x36; 3411 3417 case SDLK_KP_MULTIPLY: 3412 case SDLK_PRINT: return 0x37; /* fixme */3418 //case SDLK_PRINT: return 0x37; /* fixme */ 3413 3419 case SDLK_LALT: return 0x38; 3414 3420 case SDLK_MODE: /* alt gr*/ … … 3427 3433 case SDLK_F10: return 0x44; 3428 3434 case SDLK_PAUSE: return 0x45; /* not right */ 3429 case SDLK_NUMLOCK: return 0x45;3430 case SDLK_SCROLLOCK: return 0x46;3431 case SDLK_KP7: return 0x47;3435 //case SDLK_NUMLOCK: return 0x45; 3436 //case SDLK_SCROLLOCK: return 0x46; 3437 //case SDLK_KP7: return 0x47; 3432 3438 case SDLK_HOME: return 0x47 | 0x100; 3433 case SDLK_KP8: return 0x48;3439 //case SDLK_KP8: return 0x48; 3434 3440 case SDLK_UP: return 0x48 | 0x100; 3435 case SDLK_KP9: return 0x49;3441 //case SDLK_KP9: return 0x49; 3436 3442 case SDLK_PAGEUP: return 0x49 | 0x100; 3437 3443 case SDLK_KP_MINUS: return 0x4a; 3438 case SDLK_KP4: return 0x4b;3444 //case SDLK_KP4: return 0x4b; 3439 3445 case SDLK_LEFT: return 0x4b | 0x100; 3440 case SDLK_KP5: return 0x4c;3441 case SDLK_KP6: return 0x4d;3446 //case SDLK_KP5: return 0x4c; 3447 //case SDLK_KP6: return 0x4d; 3442 3448 case SDLK_RIGHT: return 0x4d | 0x100; 3443 3449 case SDLK_KP_PLUS: return 0x4e; 3444 case SDLK_KP1: return 0x4f;3450 //case SDLK_KP1: return 0x4f; 3445 3451 case SDLK_END: return 0x4f | 0x100; 3446 case SDLK_KP2: return 0x50;3452 //case SDLK_KP2: return 0x50; 3447 3453 case SDLK_DOWN: return 0x50 | 0x100; 3448 case SDLK_KP3: return 0x51;3454 //case SDLK_KP3: return 0x51; 3449 3455 case SDLK_PAGEDOWN: return 0x51 | 0x100; 3450 case SDLK_KP0: return 0x52;3456 //case SDLK_KP0: return 0x52; 3451 3457 case SDLK_INSERT: return 0x52 | 0x100; 3452 3458 case SDLK_KP_PERIOD: return 0x53;
Note:
See TracChangeset
for help on using the changeset viewer.