Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package gource for openSUSE:Factory checked in at 2022-06-17 21:20:58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/gource (Old) and /work/SRC/openSUSE:Factory/.gource.new.1548 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "gource" Fri Jun 17 21:20:58 2022 rev:15 rq:983189 version:0.53 Changes: -------- --- /work/SRC/openSUSE:Factory/gource/gource.changes 2022-04-10 00:42:17.288857727 +0200 +++ /work/SRC/openSUSE:Factory/.gource.new.1548/gource.changes 2022-06-17 21:23:20.226800189 +0200 @@ -1,0 +2,8 @@ +Thu Jun 16 21:30:11 UTC 2022 - Andreas Stieger <[email protected]> + +- Update to 0.53 + * Add --high-dpi option + * Fixed slider timestamp font not affected by --font-scale + * Fixed hovering over end of slider stopping time advancing + +------------------------------------------------------------------- Old: ---- gource-0.52.tar.gz New: ---- gource-0.53.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ gource.spec ++++++ --- /var/tmp/diff_new_pack.gXcrgN/_old 2022-06-17 21:23:20.594800388 +0200 +++ /var/tmp/diff_new_pack.gXcrgN/_new 2022-06-17 21:23:20.598800391 +0200 @@ -17,7 +17,7 @@ Name: gource -Version: 0.52 +Version: 0.53 Release: 0 Summary: Software version control visualization tool License: GPL-3.0-or-later ++++++ gource-0.52.tar.gz -> gource-0.53.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gource-0.52/ChangeLog new/gource-0.53/ChangeLog --- old/gource-0.52/ChangeLog 2022-03-31 23:26:40.000000000 +0200 +++ new/gource-0.53/ChangeLog 2022-04-30 05:59:15.000000000 +0200 @@ -1,3 +1,9 @@ +0.53: + * Add --high-dpi option. + * Fixed various bugs with Retina displays on MacOS. + * Fixed slider timestamp font not affected by --font-scale. + * Fixed hovering over end of slider stopping time advancing. + 0.52: * Support rendering at native resolution on Retina / Ultra HD displays. * Support ISO 8601 timestamp format. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gource-0.52/README.md new/gource-0.53/README.md --- old/gource-0.52/README.md 2022-03-31 23:26:40.000000000 +0200 +++ new/gource-0.53/README.md 2022-04-30 05:59:14.000000000 +0200 @@ -37,6 +37,14 @@ --screen SCREEN Set the number of the screen to display on. + --high-dpi + Request a high DPI display when creating the window. + + On some platforms such as MacOS, the window resolution is specified in points instead of pixels. + The --high-dpi flag may be required to access some higher resolutions. + + E.g. requesting a high DPI 800x600 window may produce a window that is 1600x1200 pixels. + --window-position XxY Initial window position on your desktop which may be made up of multiple monitors. @@ -473,4 +481,4 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License -along with this program. If not, see <http://www.gnu.org/licenses/>. \ No newline at end of file +along with this program. If not, see <http://www.gnu.org/licenses/>. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gource-0.52/configure new/gource-0.53/configure --- old/gource-0.52/configure 2022-03-31 23:26:40.000000000 +0200 +++ new/gource-0.53/configure 2022-04-30 05:59:14.000000000 +0200 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for Gource 0.52. +# Generated by GNU Autoconf 2.69 for Gource 0.53. # # Report bugs to <[email protected]>. # @@ -580,8 +580,8 @@ # Identity of this package. PACKAGE_NAME='Gource' PACKAGE_TARNAME='gource' -PACKAGE_VERSION='0.52' -PACKAGE_STRING='Gource 0.52' +PACKAGE_VERSION='0.53' +PACKAGE_STRING='Gource 0.53' PACKAGE_BUGREPORT='[email protected]' PACKAGE_URL='' @@ -1349,7 +1349,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Gource 0.52 to adapt to many kinds of systems. +\`configure' configures Gource 0.53 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1424,7 +1424,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Gource 0.52:";; + short | recursive ) echo "Configuration of Gource 0.53:";; esac cat <<\_ACEOF @@ -1557,7 +1557,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Gource configure 0.52 +Gource configure 0.53 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2169,7 +2169,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Gource $as_me 0.52, which was +It was created by Gource $as_me 0.53, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3033,7 +3033,7 @@ # Define the identity of the package. PACKAGE='gource' - VERSION='0.52' + VERSION='0.53' cat >>confdefs.h <<_ACEOF @@ -8417,7 +8417,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Gource $as_me 0.52, which was +This file was extended by Gource $as_me 0.53, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -8474,7 +8474,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -Gource config.status 0.52 +Gource config.status 0.53 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gource-0.52/configure.ac new/gource-0.53/configure.ac --- old/gource-0.52/configure.ac 2022-03-31 23:26:40.000000000 +0200 +++ new/gource-0.53/configure.ac 2022-04-30 05:59:14.000000000 +0200 @@ -3,7 +3,7 @@ AC_PREREQ(2.61) -AC_INIT(Gource, 0.52, [[email protected]]) +AC_INIT(Gource, 0.53, [[email protected]]) AC_CONFIG_AUX_DIR([build-aux]) AC_CONFIG_SRCDIR([src/main.h]) AM_INIT_AUTOMAKE([dist-bzip2 foreign subdir-objects]) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gource-0.52/data/gource.1 new/gource-0.53/data/gource.1 --- old/gource-0.52/data/gource.1 2022-03-31 23:26:39.000000000 +0200 +++ new/gource-0.53/data/gource.1 2022-04-30 05:59:14.000000000 +0200 @@ -25,6 +25,15 @@ \fB\-\-screen SCREEN\fR Set the number of the screen to display on. .TP +\fB\-\-high\-dpi\fR +Request a high DPI display when creating the window. + +On some platforms such as MacOS, the window resolution is specified in points instead of pixels. +The \-\-high-dpi flag may be required to access some higher resolutions. + +E.g. requesting a high DPI 800x600 window may produce a window that is 1600x1200 pixels. + +.TP \fB\-\-window\-position XxY\fR Initial window position on your desktop which may be made up of multiple monitors. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gource-0.52/src/core/display.cpp new/gource-0.53/src/core/display.cpp --- old/gource-0.52/src/core/display.cpp 2022-03-31 23:26:40.000000000 +0200 +++ new/gource-0.53/src/core/display.cpp 2022-04-30 05:59:14.000000000 +0200 @@ -52,6 +52,7 @@ desktop_height = 0; windowed_width = 0; windowed_height = 0; + viewport_dpi_ratio = vec2(1.0f, 1.0f); #if SDL_VERSION_ATLEAST(2,0,0) sdl_window = 0; gl_context = 0; @@ -164,6 +165,17 @@ } #endif +void SDLAppDisplay::updateViewportDPIRatio() { + int drawable_width, drawable_height; + SDL_GL_GetDrawableSize(sdl_window, &drawable_width, &drawable_height); + + int sdl_window_width, sdl_window_height; + SDL_GetWindowSize(sdl_window, &sdl_window_width, &sdl_window_height); + + viewport_dpi_ratio = vec2(drawable_width, drawable_height) / vec2(sdl_window_width, sdl_window_height); + debugLog("viewport dpi ratio %.2f x %.2f", viewport_dpi_ratio.x, viewport_dpi_ratio.y); +} + void SDLAppDisplay::setVideoMode(int width, int height, bool fullscreen, int screen) { #if SDL_VERSION_ATLEAST(2,0,0) @@ -358,7 +370,10 @@ #if SDL_VERSION_ATLEAST(2,0,0) SDL_SetWindowFullscreen(sdl_window, fullscreen ? SDL_WINDOW_FULLSCREEN_DESKTOP : 0); - SDL_GetWindowSize(sdl_window, &resized_width, &resized_height); + + SDL_GL_GetDrawableSize(sdl_window, &resized_width, &resized_height); + + updateViewportDPIRatio(); #else setVideoMode(width, height, fullscreen); @@ -376,6 +391,11 @@ } void SDLAppDisplay::toggleFrameless() { +#ifdef __APPLE__ + debugLog("Frameless toggle not supported"); + return; +#endif + #if SDL_VERSION_ATLEAST(2,0,0) if(fullscreen) return; @@ -493,11 +513,14 @@ } void SDLAppDisplay::resize(int width, int height) { + debugLog("resize %d x %d", width, height); int resized_width, resized_height; #if SDL_VERSION_ATLEAST(2,0,0) - SDL_GetWindowSize(sdl_window, &resized_width, &resized_height); + SDL_GL_GetDrawableSize(sdl_window, &resized_width, &resized_height); + + updateViewportDPIRatio(); #else setVideoMode(width, height, fullscreen); @@ -617,6 +640,13 @@ debugLog("opengl viewport %d x %d", this->width, this->height); + int drawable_width, drawable_height; + SDL_GL_GetDrawableSize(this->sdl_window, &drawable_width, &drawable_height); + + debugLog("drawable size %d x %d", drawable_width, drawable_height); + + updateViewportDPIRatio(); + glViewport(0, 0, this->width, this->height); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gource-0.52/src/core/display.h new/gource-0.53/src/core/display.h --- old/gource-0.52/src/core/display.h 2022-03-31 23:26:40.000000000 +0200 +++ new/gource-0.53/src/core/display.h 2022-04-30 05:59:15.000000000 +0200 @@ -70,10 +70,12 @@ Uint32 SDLWindowFlags(bool fullscreen); void setupExtensions(); + void updateViewportDPIRatio(); public: int width, height; int desktop_width, desktop_height; int windowed_width, windowed_height; + vec2 viewport_dpi_ratio; #if SDL_VERSION_ATLEAST(2,0,0) SDL_Window* sdl_window; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gource-0.52/src/core/sdlapp.cpp new/gource-0.53/src/core/sdlapp.cpp --- old/gource-0.52/src/core/sdlapp.cpp 2022-03-31 23:26:40.000000000 +0200 +++ new/gource-0.53/src/core/sdlapp.cpp 2022-04-30 05:59:14.000000000 +0200 @@ -347,9 +347,15 @@ quit(); break; - case SDL_MOUSEMOTION: - mouseMove(&event.motion); + case SDL_MOUSEMOTION: { + SDL_MouseMotionEvent motion = event.motion; + motion.x *= display.viewport_dpi_ratio.x; + motion.y *= display.viewport_dpi_ratio.y; + motion.xrel *= display.viewport_dpi_ratio.x; + motion.yrel *= display.viewport_dpi_ratio.y; + mouseMove(&motion); break; + } #if SDL_VERSION_ATLEAST(2,0,0) case SDL_TEXTINPUT: @@ -376,9 +382,13 @@ #endif case SDL_MOUSEBUTTONDOWN: - case SDL_MOUSEBUTTONUP: - mouseClick(&event.button); + case SDL_MOUSEBUTTONUP: { + SDL_MouseButtonEvent button = event.button; + button.x *= display.viewport_dpi_ratio.x; + button.y *= display.viewport_dpi_ratio.y; + mouseClick(&button); break; + } case SDL_KEYDOWN: case SDL_KEYUP: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gource-0.52/src/core/seeklog.cpp new/gource-0.53/src/core/seeklog.cpp --- old/gource-0.52/src/core/seeklog.cpp 2022-03-31 23:26:40.000000000 +0200 +++ new/gource-0.53/src/core/seeklog.cpp 2022-04-30 05:59:15.000000000 +0200 @@ -159,6 +159,7 @@ } void SeekLog::setPointer(std::streampos pointer) { + stream->clear(); stream->seekg(pointer); } @@ -168,8 +169,6 @@ void SeekLog::seekTo(float percent) { - if(isFinished()) stream->clear(); - std::streampos mem_offset = (std::streampos) (percent * file_size); setPointer(mem_offset); @@ -205,16 +204,12 @@ // temporarily move the file pointer to get a line somewhere else in the file bool SeekLog::getNextLineAt(std::string& line, float percent) { - stream->clear(); - std::streampos currpointer = getPointer(); seekTo(percent); bool success = getNextLine(line); - stream->clear(); - //set the pointer back setPointer(currpointer); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gource-0.52/src/core/settings.cpp new/gource-0.53/src/core/settings.cpp --- old/gource-0.52/src/core/settings.cpp 2022-03-31 23:26:40.000000000 +0200 +++ new/gource-0.53/src/core/settings.cpp 2022-04-30 05:59:15.000000000 +0200 @@ -40,6 +40,7 @@ conf_sections["output-framerate"] = "display"; conf_sections["transparent"] = "display"; conf_sections["no-vsync"] = "display"; + conf_sections["high-dpi"] = "display"; //translate args arg_aliases["f"] = "fullscreen"; @@ -57,6 +58,7 @@ arg_types["transparent"] = "bool"; arg_types["multi-sampling"] = "bool"; arg_types["no-vsync"] = "bool"; + arg_types["high-dpi"] = "bool"; arg_types["output-ppm-stream"] = "string"; arg_types["output-framerate"] = "int"; @@ -69,12 +71,14 @@ #else display_height = 768; #endif + viewport_specified = false; fullscreen = false; frameless = false; multisample = false; transparent = false; resizable = true; vsync = true; + high_dpi = false; screen = -1; @@ -120,6 +124,10 @@ section->setEntry(new ConfEntry("no-vsync", true)); } + if(high_dpi) { + section->setEntry(new ConfEntry("high-dpi", high_dpi)); + } + conf.setSection(section); } @@ -364,7 +372,7 @@ ConfEntry* entry = 0; - bool viewport_specified = false; + viewport_specified = false; if((entry = display_settings->getEntry("viewport")) != 0) { @@ -431,6 +439,10 @@ vsync = false; } + if(display_settings->getBool("high-dpi")) { + high_dpi = true; + } + if((entry = display_settings->getEntry("output-ppm-stream")) != 0) { if(!entry->hasValue()) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gource-0.52/src/core/settings.h new/gource-0.53/src/core/settings.h --- old/gource-0.52/src/core/settings.h 2022-03-31 23:26:40.000000000 +0200 +++ new/gource-0.53/src/core/settings.h 2022-04-30 05:59:14.000000000 +0200 @@ -42,12 +42,14 @@ int window_x; int window_y; int screen; + bool viewport_specified; bool multisample; bool fullscreen; bool frameless; bool transparent; bool resizable; bool vsync; + bool high_dpi; std::string output_ppm_filename; int output_framerate; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gource-0.52/src/gource.cpp new/gource-0.53/src/gource.cpp --- old/gource-0.52/src/gource.cpp 2022-03-31 23:26:40.000000000 +0200 +++ new/gource-0.53/src/gource.cpp 2022-04-30 05:59:15.000000000 +0200 @@ -37,7 +37,12 @@ } if(gGourceSettings.default_font_scale) { - gGourceSettings.font_scale = (float) glm::max(1, display.width / 1920); + if(display.viewport_dpi_ratio.x > 1.0f) { + gGourceSettings.font_scale = display.viewport_dpi_ratio.x; + } else { + int threshold = 1600; + gGourceSettings.font_scale = (float) (1 + glm::max(0, display.height / threshold)); + } debugLog("setting font scale for resolution %d x %d to %.2f", display.width, display.height, gGourceSettings.font_scale); gGourceSettings.setScaledFontSizes(); } @@ -63,6 +68,8 @@ fontdirname.dropShadow(true); fontdirname.roundCoordinates(true); + slider.init(); + //only use bloom with alpha channel if transparent due to artifacts on some video cards std::string bloom_tga = gGourceSettings.transparent ? "bloom_alpha.tga" : "bloom.tga"; @@ -333,6 +340,8 @@ if(gGourceSettings.disable_input) return; if(gGourceSettings.hide_mouse) return; + // debugLog("mouse move %d, %d (change %d, %d)", e->x, e->y, e->xrel, e->yrel); + if(grab_mouse) { #if not SDL_VERSION_ATLEAST(2,0,0) int warp_x = display.width/2; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gource-0.52/src/gource_settings.cpp new/gource-0.53/src/gource_settings.cpp --- old/gource-0.52/src/gource_settings.cpp 2022-03-31 23:26:40.000000000 +0200 +++ new/gource-0.53/src/gource_settings.cpp 2022-04-30 05:59:15.000000000 +0200 @@ -56,6 +56,9 @@ printf(" -f, --fullscreen Fullscreen\n"); printf(" --screen SCREEN Screen number\n"); printf(" --multi-sampling Enable multi-sampling\n"); +#ifndef _WIN32 + printf(" --high-dpi Request a high DPI display\n"); +#endif printf(" --no-vsync Disable vsync\n\n"); printf(" --start-date 'YYYY-MM-DD hh:mm:ss +tz' Start at a date and optional time\n"); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gource-0.52/src/gource_settings.h new/gource-0.53/src/gource_settings.h --- old/gource-0.52/src/gource_settings.h 2022-03-31 23:26:40.000000000 +0200 +++ new/gource-0.53/src/gource_settings.h 2022-04-30 05:59:15.000000000 +0200 @@ -18,7 +18,7 @@ #ifndef GOURCE_SETTINGS_H #define GOURCE_SETTINGS_H -#define GOURCE_VERSION "0.52" +#define GOURCE_VERSION "0.53" #include "core/texture.h" #include "core/settings.h" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gource-0.52/src/main.cpp new/gource-0.53/src/main.cpp --- old/gource-0.52/src/main.cpp 2022-03-31 23:26:40.000000000 +0200 +++ new/gource-0.53/src/main.cpp 2022-04-30 05:59:15.000000000 +0200 @@ -148,8 +148,19 @@ display.enableResize(true); } - //Stop OS interfering with the requested resolution on Retina / Ultra HD displays - display.enableHighDPIAwareness(true); + // Change OS High DPI display behaviour + // On Windows this behaves differently, it seems safe to always enable it + bool high_dpi = true; +#ifndef _WIN32 + // Requesting High DPI on MacOS may cause the pixel resolution to be doubled. + // If a resolution has been specified this may not be appropriate + // E.g. if you are recording a video at a specific resolution + // Can override by supplying --high-dpi option. + if(gGourceSettings.viewport_specified && !gGourceSettings.high_dpi) { + high_dpi = false; + } +#endif + display.enableHighDPIAwareness(high_dpi); try { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gource-0.52/src/slider.cpp new/gource-0.53/src/slider.cpp --- old/gource-0.52/src/slider.cpp 2022-03-31 23:26:40.000000000 +0200 +++ new/gource-0.53/src/slider.cpp 2022-04-30 05:59:15.000000000 +0200 @@ -22,8 +22,10 @@ PositionSlider::PositionSlider(float percent) { this->percent = percent; +} - font = fontmanager.grab(gGourceSettings.font_file, 16); +void PositionSlider::init() { + font = fontmanager.grab(gGourceSettings.font_file, 16 * gGourceSettings.font_scale); font.dropShadow(true); slidercol = vec3(1.0, 1.0, 1.0); @@ -155,7 +157,8 @@ glColor4f(1.0, 1.0, 1.0, 1.0); if(caption.size() && mouseover >= 0.0) { - font.draw(std::min((double)display.width - capwidth - 1.0, std::max(1.0, mouseover - (capwidth/2.0))), bounds.min.y - 25.0, caption); + int height_offset = 25 * gGourceSettings.font_scale; + font.draw(std::min((double)display.width - capwidth - 1.0, std::max(1.0, mouseover - (capwidth/2.0))), bounds.min.y - height_offset, caption); } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gource-0.52/src/slider.h new/gource-0.53/src/slider.h --- old/gource-0.52/src/slider.h 2022-03-31 23:26:40.000000000 +0200 +++ new/gource-0.53/src/slider.h 2022-04-30 05:59:14.000000000 +0200 @@ -42,6 +42,8 @@ public: PositionSlider(float percent = 0.0f); + void init(); + void setColour(vec3 col); void setCaption(const std::string& cap);
