This commit is contained in:
Shinovon 2026-05-12 08:55:18 +05:00
parent 6992f313a9
commit dfdd037ed3
4 changed files with 61 additions and 61 deletions

View file

@ -1,9 +1,11 @@
#pragma once
#ifdef _DEBUG
#define LOGS
#ifdef __SYMBIAN32__
#define LOGS_RDEBUG
#endif
#endif
#ifdef AUDIO_OAL
#undef AUDIO_OAL

View file

@ -96,6 +96,7 @@ static int clamp(int size, int targetSize)
static void halveTexture(RwTexture *texture){
if(texture == nil)
return;
debug("halving %s", texture->name);
RwRaster *oldRaster = RwTextureGetRaster(texture);
if(oldRaster == nil)
@ -156,6 +157,7 @@ static void downscaleTexture(RwTexture *texture) {
RwRaster *oldRaster = RwTextureGetRaster(texture);
if (oldRaster == nil)
return;
debug("downscaling %s", texture->name);
extern bool moreVram;
int targetSize = moreVram ? 64 : 32;
@ -211,7 +213,6 @@ RwTextureGtaStreamRead(RwStream *stream)
#ifdef __SYMBIAN32__
else if (gGameState != GS_PLAYING_GAME || FrontEndMenuManager.m_bMenuActive) {
if (tex != nil && tex->raster != nil && (RwRasterGetWidth(tex->raster) > 128 || RwRasterGetHeight(tex->raster) > 128)) {
// debug("downscaling %s", tex->name);
halveTexture(tex);
}
}
@ -533,7 +534,7 @@ CreateTxdImageForVideoCard()
// so let's hope that is the case for all
rw::gl3::needToReadBackTextures = true;
#elif defined RW_GLES1
rw::gl1::needToReadBackTextures = true;
rw::gles1::needToReadBackTextures = true;
#endif
#ifdef DISABLE_VSYNC_ON_TEXTURE_CONVERSION
@ -585,7 +586,7 @@ CreateTxdImageForVideoCard()
#ifdef RW_GL3
rw::gl3::needToReadBackTextures = false;
#elif defined RW_GLES1
rw::gl1::needToReadBackTextures = false;
rw::gles1::needToReadBackTextures = false;
#endif
return false;
}
@ -622,7 +623,7 @@ CreateTxdImageForVideoCard()
#ifdef RW_GL3
rw::gl3::needToReadBackTextures = false;
#elif defined RW_GLES1
rw::gl1::needToReadBackTextures = false;
rw::gles1::needToReadBackTextures = false;
#endif
if (!pDir->WriteDirFile("models\\txd.dir")) {

View file

@ -18,7 +18,7 @@
#endif
#endif
#if 0
#ifdef _DEBUG
extern void re3_debug(const char *format, ...);
extern void re3_trace(const char *filename, unsigned int lineno, const char *func, const char *format, ...);
#define CHECK_GL_ERROR(trace) do { \

View file

@ -395,11 +395,8 @@ rasterLock(Raster *raster, int32 level, int32 lockMode)
px = (uint8*)rwMalloc(allocSz, MEMDUR_EVENT | ID_DRIVER);
assert(raster->pixels == nil);
raster->pixels = px;
#ifdef __SYMBIAN32__
memset(px, 0, allocSz);
#else
glReadBuffer(GL_BACK);
#endif
glReadPixels(0, 0, raster->width, raster->height, GL_RGB, GL_UNSIGNED_BYTE, px);
raster->privateFlags = lockMode;