Fix previous sdl ppp commit, too messy to revert.
Signed-off-by: Andrea Odetti <mariofutire@gmail.com>
This commit is contained in:
parent
c7a8c628e4
commit
4ff7741a41
3 changed files with 5 additions and 12 deletions
|
@ -30,18 +30,8 @@ namespace
|
||||||
int sw, sh;
|
int sw, sh;
|
||||||
|
|
||||||
getScreenData(data, width, height, sx, sy, sw, sh);
|
getScreenData(data, width, height, sx, sy, sw, sh);
|
||||||
|
|
||||||
#if 0
|
|
||||||
void * pixels;
|
|
||||||
int pitch;
|
|
||||||
SDL_LockTexture(tex.get(), nullptr, &pixels, &pitch);
|
|
||||||
|
|
||||||
memcpy(pixels, data, width * height * 4);
|
|
||||||
|
|
||||||
SDL_UnlockTexture(tex.get());
|
|
||||||
#else
|
|
||||||
SDL_UpdateTexture(tex.get(), nullptr, data, width * 4);
|
SDL_UpdateTexture(tex.get(), nullptr, data, width * 4);
|
||||||
#endif
|
|
||||||
SDL_Rect srect;
|
SDL_Rect srect;
|
||||||
srect.x = sx;
|
srect.x = sx;
|
||||||
srect.y = sy;
|
srect.y = sy;
|
||||||
|
|
|
@ -197,12 +197,15 @@ void run_sdl(int argc, const char * argv [])
|
||||||
SDL_RendererInfo info;
|
SDL_RendererInfo info;
|
||||||
SDL_GetRendererInfo(ren.get(), &info);
|
SDL_GetRendererInfo(ren.get(), &info);
|
||||||
|
|
||||||
|
std::cerr << "SDL Renderer:" << info.name << std::endl;
|
||||||
for (size_t i = 0; i < info.num_texture_formats; ++i)
|
for (size_t i = 0; i < info.num_texture_formats; ++i)
|
||||||
{
|
{
|
||||||
std::cerr << SDL_GetPixelFormatName(info.texture_formats[i]) << std::endl;
|
std::cerr << SDL_GetPixelFormatName(info.texture_formats[i]) << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
const Uint32 format = SDL_PIXELFORMAT_ARGB8888;
|
const Uint32 format = SDL_PIXELFORMAT_ARGB8888;
|
||||||
|
std::cerr << "Selected format: " << SDL_GetPixelFormatName(format) << std::endl;
|
||||||
|
|
||||||
std::shared_ptr<SDL_Texture> tex(SDL_CreateTexture(ren.get(), format, SDL_TEXTUREACCESS_STATIC, width, height), SDL_DestroyTexture);
|
std::shared_ptr<SDL_Texture> tex(SDL_CreateTexture(ren.get(), format, SDL_TEXTUREACCESS_STATIC, width, height), SDL_DestroyTexture);
|
||||||
|
|
||||||
Emulator emulator(win, ren, tex);
|
Emulator emulator(win, ren, tex);
|
||||||
|
|
|
@ -45,7 +45,7 @@ DWORD g_dwCyclesThisFrame = 0;
|
||||||
// but it is not at the moment
|
// but it is not at the moment
|
||||||
bool g_bFullSpeed = true;
|
bool g_bFullSpeed = true;
|
||||||
|
|
||||||
AppMode_e g_nAppMode = MODE_LOGO;
|
AppMode_e g_nAppMode = MODE_RUNNING;
|
||||||
|
|
||||||
HANDLE g_hCustomRomF8 = INVALID_HANDLE_VALUE; // Cmd-line specified custom ROM at $F800..$FFFF
|
HANDLE g_hCustomRomF8 = INVALID_HANDLE_VALUE; // Cmd-line specified custom ROM at $F800..$FFFF
|
||||||
std::string g_sProgramDir; // Directory of where AppleWin executable resides
|
std::string g_sProgramDir; // Directory of where AppleWin executable resides
|
||||||
|
|
Loading…
Add table
Reference in a new issue