Texture linear filtering is enabled by default, tiny tweak to Biniax2

This commit is contained in:
pelya
2012-09-20 14:32:55 +03:00
parent 42a9f2e54c
commit 41fd185b16
8 changed files with 22 additions and 22 deletions

View File

@@ -107,7 +107,7 @@ class Globals
public static int MultitouchGestureSensitivity = 1;
public static int TouchscreenCalibration[] = new int[4];
public static String DataDir = new String("");
public static boolean SmoothVideo = false;
public static boolean VideoLinearFilter = true;
public static boolean MultiThreadedVideo = false;
public static boolean BrokenLibCMessageShown = false;
}

View File

@@ -132,7 +132,7 @@ class Settings
out.writeInt(Globals.ScreenKbControlsLayout[i][ii]);
out.writeInt(Globals.LeftClickKey);
out.writeInt(Globals.RightClickKey);
out.writeBoolean(Globals.SmoothVideo);
out.writeBoolean(Globals.VideoLinearFilter);
out.writeInt(Globals.LeftClickTimeout);
out.writeInt(Globals.RightClickTimeout);
out.writeBoolean(Globals.RelativeMouseMovement);
@@ -278,7 +278,7 @@ class Settings
Globals.ScreenKbControlsLayout[i][ii] = settingsFile.readInt();
Globals.LeftClickKey = settingsFile.readInt();
Globals.RightClickKey = settingsFile.readInt();
Globals.SmoothVideo = settingsFile.readBoolean();
Globals.VideoLinearFilter = settingsFile.readBoolean();
Globals.LeftClickTimeout = settingsFile.readInt();
Globals.RightClickTimeout = settingsFile.readInt();
Globals.RelativeMouseMovement = settingsFile.readBoolean();
@@ -2292,7 +2292,7 @@ class Settings
};
boolean defaults[] = {
Globals.KeepAspectRatio,
Globals.SmoothVideo
Globals.VideoLinearFilter
};
if(Globals.SwVideoMode && !Globals.CompatibilityHacksVideo)
@@ -2304,7 +2304,7 @@ class Settings
};
boolean defaults2[] = {
Globals.KeepAspectRatio,
Globals.SmoothVideo,
Globals.VideoLinearFilter,
Globals.MultiThreadedVideo
};
items = items2;
@@ -2332,7 +2332,7 @@ class Settings
if( item == 0 )
Globals.KeepAspectRatio = isChecked;
if( item == 1 )
Globals.SmoothVideo = isChecked;
Globals.VideoLinearFilter = isChecked;
if( item == 2 )
Globals.MultiThreadedVideo = isChecked;
}
@@ -2388,8 +2388,8 @@ class Settings
static void Apply(Activity p)
{
nativeSetVideoDepth(Globals.VideoDepthBpp, Globals.NeedGles2 ? 1 : 0);
if(Globals.SmoothVideo)
nativeSetSmoothVideo();
if(Globals.VideoLinearFilter)
nativeSetVideoLinearFilter();
if( Globals.CompatibilityHacksVideo )
{
Globals.MultiThreadedVideo = true;
@@ -2583,7 +2583,7 @@ class Settings
private static native void nativeSetAccelerometerUsed();
private static native void nativeSetMultitouchUsed();
private static native void nativeSetTouchscreenKeyboardUsed();
private static native void nativeSetSmoothVideo();
private static native void nativeSetVideoLinearFilter();
private static native void nativeSetVideoDepth(int bpp, int gles2);
private static native void nativeSetCompatibilityHacks();
private static native void nativeSetVideoMultithreaded();

View File

@@ -30,9 +30,9 @@ RedefinedKeys="RETURN"
AppTouchscreenKeyboardKeysAmount=0
AppTouchscreenKeyboardKeysAmountAutoFire=0
RedefinedKeysScreenKb="RETURN SPACE"
StartupMenuButtonTimeout=1000
StartupMenuButtonTimeout=0
HiddenMenuOptions='DisplaySizeConfig MouseConfigMainMenu'
FirstStartMenuOptions='new Settings.VideoSettingsConfig()'
FirstStartMenuOptions=''
MultiABI=n
AppVersionCode=1401
AppVersionName="1.4.01"

View File

@@ -1121,9 +1121,9 @@ void gfxNewFallingBlock( BNX_INT16 x, BNX_INT16 y, BNX_INT16 id )
j %= cGfxMaxParticles;
_Gfx.falling_blocks[ j ].id = id;
_Gfx.falling_blocks[ j ].x = cGfxZeroX + x * cGfxPairPlusX;
_Gfx.falling_blocks[ j ].y = cGfxZeroY + y * cGfxPairPlusY + cGfxParticleFall;
_Gfx.falling_blocks[ j ].y = cGfxZeroY + y * cGfxPairPlusY + cGfxParticleMinSp;
_Gfx.falling_blocks[ j ].dx = cGfxParticleSpeed - ( sysRand( cGfxParticleSpeed<<1 ) + cGfxParticleMinSp );
_Gfx.falling_blocks[ j ].dy = cGfxParticleFall;
_Gfx.falling_blocks[ j ].dy = cGfxParticleMinSp;
}
void gfxUpdateFallingBlocks()

View File

@@ -368,7 +368,7 @@ SDL_Surface *ANDROID_SetVideoMode(_THIS, SDL_Surface *current,
SDL_OutOfMemory();
return(NULL);
}
if( SDL_ANDROID_SmoothVideo )
if( SDL_ANDROID_VideoLinearFilter )
SDL_SetTextureScaleMode((SDL_Texture *)current->hwdata, SDL_SCALEMODE_SLOW);
// Register main video texture to be recreated when needed
@@ -518,7 +518,7 @@ static int ANDROID_AllocHWSurface(_THIS, SDL_Surface *surface)
return(-1);
}
if( SDL_ANDROID_SmoothVideo )
if( SDL_ANDROID_VideoLinearFilter )
SDL_SetTextureScaleMode((SDL_Texture *)surface->hwdata, SDL_SCALEMODE_SLOW);
if( surface->format->Amask )
@@ -604,7 +604,7 @@ static int ANDROID_LockHWSurface(_THIS, SDL_Surface *surface)
SDL_OutOfMemory();
return(-1);
}
if( SDL_ANDROID_SmoothVideo )
if( SDL_ANDROID_VideoLinearFilter )
SDL_SetTextureScaleMode((SDL_Texture *)SDL_CurrentVideoSurface->hwdata, SDL_SCALEMODE_SLOW);
// Register main video texture to be recreated when needed
HwSurfaceCount++;
@@ -1102,7 +1102,7 @@ void SDL_ANDROID_VideoContextRecreated()
SDL_OutOfMemory();
return;
}
if( SDL_ANDROID_SmoothVideo )
if( SDL_ANDROID_VideoLinearFilter )
SDL_SetTextureScaleMode((SDL_Texture *)HwSurfaceList[i]->hwdata, SDL_SCALEMODE_SLOW);
ANDROID_UnlockHWSurface(NULL, HwSurfaceList[i]); // Re-fill texture with graphics
}

View File

@@ -71,7 +71,7 @@ static int glContextLost = 0;
static int showScreenKeyboardDeferred = 0;
static const char * showScreenKeyboardOldText = "";
static int showScreenKeyboardSendBackspace = 0;
int SDL_ANDROID_SmoothVideo = 0;
int SDL_ANDROID_VideoLinearFilter = 0;
int SDL_ANDROID_VideoMultithreaded = 0;
int SDL_ANDROID_VideoForceSoftwareMode = 0;
int SDL_ANDROID_CompatibilityHacks = 0;
@@ -332,9 +332,9 @@ int SDL_ANDROID_SetOpenALPutToBackgroundCallback(
}
JNIEXPORT void JNICALL
JAVA_EXPORT_NAME(Settings_nativeSetSmoothVideo) (JNIEnv* env, jobject thiz)
JAVA_EXPORT_NAME(Settings_nativeSetVideoLinearFilter) (JNIEnv* env, jobject thiz)
{
SDL_ANDROID_SmoothVideo = 1;
SDL_ANDROID_VideoLinearFilter = 1;
}
JNIEXPORT void JNICALL

View File

@@ -40,7 +40,7 @@ extern int SDL_ANDROID_TouchscreenCalibrationWidth;
extern int SDL_ANDROID_TouchscreenCalibrationHeight;
extern int SDL_ANDROID_TouchscreenCalibrationX;
extern int SDL_ANDROID_TouchscreenCalibrationY;
extern int SDL_ANDROID_SmoothVideo;
extern int SDL_ANDROID_VideoLinearFilter;
extern int SDL_ANDROID_VideoMultithreaded;
extern int SDL_ANDROID_VideoForceSoftwareMode;
extern int SDL_ANDROID_CompatibilityHacks;

View File

@@ -179,7 +179,7 @@ static inline void drawCharTexFlip(GLTexture_t * tex, SDL_Rect * src, SDL_Rect *
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
if( SDL_ANDROID_SmoothVideo )
if( SDL_ANDROID_VideoLinearFilter )
{
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);