Removed "always resize" option for screen resizing from ChangeAppSettings.sh, it now equals to "y"

It still leaves part of screen not resized on my widescreen HTC Evo
This commit is contained in:
pelya
2010-07-19 18:46:43 +03:00
parent e7112534b4
commit f72e72272a
5 changed files with 11 additions and 28 deletions

View File

@@ -1,10 +1,10 @@
LibSdlVersion=1.2
LibSdlVersion=1.3
AppName="Alien Blaster"
AppFullName=de.schwardtnet.alienblaster
ScreenOrientation=h
AppDataDownloadUrl="http://sites.google.com/site/xpelyax/Home/alienblaster110_data.zip?attredirects=0&d=1"
DownloadToSdcard=n
SdlVideoResize=a
SdlVideoResize=y
NeedDepthBuffer=n
MultiABI=n
AppVersionCode=110001

View File

@@ -40,7 +40,7 @@ if [ -n "$var" ] ; then
DownloadToSdcard="$var"
fi
echo -n "\nApplication window should be resized to fit into 480x320 screen,\n(y) or (n) or (a)lways resize, even if screen is bigger ($SdlVideoResize): "
echo -n "\nApplication window should be resized to fit into 480x320 screen (y) or (n) ($SdlVideoResize): "
read var
if [ -n "$var" ] ; then
SdlVideoResize="$var"
@@ -132,8 +132,6 @@ fi
AppDataDownloadUrl1="`echo $AppDataDownloadUrl | sed 's/[&]/%26/g'`"
if [ "$SdlVideoResize" = "y" ] ; then
SdlVideoResize=1
elif [ "$SdlVideoResize" = "a" ] ; then
SdlVideoResize=2
else
SdlVideoResize=0
fi

View File

@@ -21,7 +21,7 @@ SDL_TRACKBALL_KEYUP_DELAY := 1
# If the application designed for higher screen resolution enable this to get the screen
# resized in HW-accelerated way, however it eats a tiny bit of CPU
SDL_VIDEO_RENDER_RESIZE := 2
SDL_VIDEO_RENDER_RESIZE := 1
COMPILED_LIBRARIES := sdl_mixer sdl_image

View File

@@ -1 +1 @@
../sdl/sdl-1.2
../sdl/sdl-1.3

View File

@@ -2371,12 +2371,6 @@ SDL_RenderClear()
#if SDL_VIDEO_RENDER_RESIZE
#if ( SDL_VIDEO_RENDER_RESIZE == 2 )
#define SDL_VIDEO_RENDER_RESIZE_ALWAYS 1
#else
#define SDL_VIDEO_RENDER_RESIZE_ALWAYS
#endif
static inline void
SDL_RESIZE_resizePoints(int realW, int fakeW, int realH, int fakeH,
const SDL_Point * src, SDL_Point * dest, int count )
@@ -2402,6 +2396,7 @@ SDL_RESIZE_resizeRects(int realW, int fakeW, int realH, int fakeH,
dest[i].h = (src[i]->h + src[i]->y) * realH / fakeH - dest[i].y;
}
}
#endif
int
@@ -2445,9 +2440,7 @@ SDL_RenderDrawPoints(const SDL_Point * points, int count)
realH = renderer->window->display->current_mode.h;
fakeW = renderer->window->w;
fakeH = renderer->window->h;
#if !(SDL_VIDEO_RENDER_RESIZE_ALWAYS)
if( fakeW > realW || fakeH > realH )
#endif
//if( fakeW > realW || fakeH > realH )
{
SDL_Point * resized = SDL_stack_alloc( SDL_Point, count );
if( ! resized ) {
@@ -2506,9 +2499,7 @@ SDL_RenderDrawLines(const SDL_Point * points, int count)
realH = renderer->window->display->current_mode.h;
fakeW = renderer->window->w;
fakeH = renderer->window->h;
#if !(SDL_VIDEO_RENDER_RESIZE_ALWAYS)
if( fakeW > realW || fakeH > realH )
#endif
//if( fakeW > realW || fakeH > realH )
{
SDL_Point * resized = SDL_stack_alloc( SDL_Point, count );
if( ! resized ) {
@@ -2577,9 +2568,7 @@ SDL_RenderDrawRects(const SDL_Rect ** rects, int count)
realH = renderer->window->display->current_mode.h;
fakeW = renderer->window->w;
fakeH = renderer->window->h;
#if !(SDL_VIDEO_RENDER_RESIZE_ALWAYS)
if( fakeW > realW || fakeH > realH )
#endif
//if( fakeW > realW || fakeH > realH )
{
SDL_Rect * resized = SDL_stack_alloc( SDL_Rect, count );
if( ! resized ) {
@@ -2659,9 +2648,7 @@ SDL_RenderFillRects(const SDL_Rect ** rects, int count)
realH = renderer->window->display->current_mode.h;
fakeW = renderer->window->w;
fakeH = renderer->window->h;
#if !(SDL_VIDEO_RENDER_RESIZE_ALWAYS)
if( fakeW > realW || fakeH > realH )
#endif
//if( fakeW > realW || fakeH > realH )
{
SDL_Rect * resized = SDL_stack_alloc( SDL_Rect, count );
if( ! resized ) {
@@ -2758,9 +2745,7 @@ SDL_RenderCopy(SDL_Texture * texture, const SDL_Rect * srcrect,
realH = window->display->current_mode.h;
fakeW = window->w;
fakeH = window->h;
#if !(SDL_VIDEO_RENDER_RESIZE_ALWAYS)
if( fakeW > realW || fakeH > realH )
#endif
//if( fakeW > realW || fakeH > realH )
{
// Calculate bottom-right corner instead of width/height, and substract upper-left corner,
// otherwise we'll have rounding errors and holes between textures