adonthell-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[adonthell-commits] master 94b1b05: UPDATED version to 0.3.7


From: Kai Sterker
Subject: [adonthell-commits] master 94b1b05: UPDATED version to 0.3.7
Date: Sat, 28 Oct 2017 12:48:34 -0400 (EDT)

branch: master
commit 94b1b0568e7497aa07b341cfbbeb3272bff3825c
Author: Kai Sterker <address@hidden>
Commit: Kai Sterker <address@hidden>

    UPDATED version to 0.3.7
---
 NEWBIE        | 16 ++++++++--------
 NEWS          |  5 +++++
 configure.ac  |  2 +-
 src/screen.cc | 14 ++++++++------
 4 files changed, 22 insertions(+), 15 deletions(-)

diff --git a/NEWBIE b/NEWBIE
index 85d6506..f88ec1e 100644
--- a/NEWBIE
+++ b/NEWBIE
@@ -151,24 +151,24 @@ The package names might differ slightly on your 
distribution, but
 the following list should help you to find all required packages:
 
 For SDL you will need
-       libsdl2-2.0-0
-       libsdl2-dev
-       libsdl2-mixer-2.0-0
+    libsdl2-2.0-0
+    libsdl2-dev
+    libsdl2-mixer-2.0-0
     libsdl2-mixer-dev
     libsdl2-ttf-2.0-0
     libsdl2-ttf-dev 
 
 for python
-       python3.5
+    python3.5
     libpython3.5
     libpython3.5-dev
 
 for freetype
-       libfreetype6
+    libfreetype6
     libfreetype6-dev
     
 and for Ogg Vorbis
-       libogg0
+    libogg0
     libogg-dev
     libvorbis0a
     libvorbis-dev
@@ -231,7 +231,7 @@ installed and configured in your system.
 
 Now that the required libraries are built and installed on your
 system, you need to build the Adonthell program itself. The
-latest version of Adonthell is 0.3.6. You can download it from the
+latest version of Adonthell is 0.3.7. You can download it from the
 Adonthell website: http://adonthell.nongnu.org/download/.
 
 
@@ -258,7 +258,7 @@ directory and typing:
 
 A successful configure will produce an output like this:
 
-       Adonthell v0.3.6
+       Adonthell v0.3.7
 
        SDL ....................... : 2.0.4
        Python .................... : 3.5.1+
diff --git a/NEWS b/NEWS
index bab7b52..8ddab92 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,8 @@
+version 0.3.7
+- Added basic gamecontroller support
+- Set fullscreen resolution to highest available multiple of 320x240
+- Support Haiku OS
+
 version 0.3.6
 - Letterbox fullscreen mode that preserves 4:3 aspect ratio
 - Save configuration and game states to standard locations
diff --git a/configure.ac b/configure.ac
index 6de93fe..892fd9c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3,7 +3,7 @@ dnl Process this file with autoconf to produce a configure 
script.
 dnl **************************************************************
 
 AC_PREREQ(2.59)
-AC_INIT([Adonthell], [0.3.6], address@hidden, [adonthell], 
[http://adonthell.nongnu.org])
+AC_INIT([Adonthell], [0.3.7], address@hidden, [adonthell], 
[http://adonthell.nongnu.org])
 AC_CONFIG_SRCDIR([README])
 AC_CONFIG_AUX_DIR(.)
 
diff --git a/src/screen.cc b/src/screen.cc
index 0b8b339..5da8403 100644
--- a/src/screen.cc
+++ b/src/screen.cc
@@ -321,7 +321,7 @@ u_int8 screen::get_scale_for_display(u_int8 screen, u_int16 
nl, u_int16 nh)
                        {
                                if (SDL_GetDisplayMode(screen, i, &mode) > -1)
                                {
-                                       if (mode.w % 320 == 0 && mode.h % 240 
== 0)
+                                       if (mode.w % nl == 0 && mode.h % nh == 
0)
                                        {
                                                bounds.w = mode.w;
                                                bounds.h = mode.h;
@@ -329,6 +329,7 @@ u_int8 screen::get_scale_for_display(u_int8 screen, u_int16 
nl, u_int16 nh)
                                        }
                                }
                        }
+                       break;
                }
        }
 
@@ -342,12 +343,13 @@ void screen::update_scale()
 {
        int w, h;
 
-       SDL_GetRendererOutputSize(Renderer, &w, &h);
-
-       int scale_x = w / length();
-       int scale_y = h / height();
+       if (SDL_GetRendererOutputSize(Renderer, &w, &h) == 0)
+       {
+               int scale_x = w / length();
+               int scale_y = h / height();
 
-       scale_ = scale_x > scale_y ? scale_y : scale_x;
+               scale_ = scale_x > scale_y ? scale_y : scale_x;
+       }
 
        if (mode_ == 1)
        {



reply via email to

[Prev in Thread] Current Thread [Next in Thread]