gosu 1.1.0.pre2 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
 - data/src/Input.cpp +1 -10
 - data/src/Window.cpp +1 -9
 - metadata +4 -4
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA256:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: 0c00e9925256d5f0c158716eeb225fd8bc5b9af17335f2a3b67b892a1c7d87d7
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 3e2edbae0cf3ae45cf926ff228fd621c2d092c0e1ccbf425884b0ba01c984199
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: ab8f4550f297ae89f321e133b3ca9e0b5f77ab64b9c66415e379270eb90ac1c000de685b175e3dbfb5a9de34afa3cfb4eda3d8a5e40ebe9dd18b25ef22964dcf
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: 87803f08a8a4a13ec027ee265cc08be511eb95c30bc1494766310485d757799bffc794427f2fe1002142b00b1282b4ade6b90b985f01f00f3b03db041a12299b
         
     | 
    
        data/src/Input.cpp
    CHANGED
    
    | 
         @@ -78,20 +78,11 @@ struct Gosu::Input::Impl 
     | 
|
| 
       78 
78 
     | 
    
         | 
| 
       79 
79 
     | 
    
         
             
                void update_mouse_position()
         
     | 
| 
       80 
80 
     | 
    
         
             
                {
         
     | 
| 
       81 
     | 
    
         
            -
                #if SDL_VERSION_ATLEAST(2, 0, 5)
         
     | 
| 
       82 
     | 
    
         
            -
                    // SDL_GetGlobalMouseState was added in SDL 2.0.4, but it only started using the same
         
     | 
| 
       83 
     | 
    
         
            -
                    // coordinate system as SDL_GetWindowPosition on X11 in 2.0.5.
         
     | 
| 
       84 
81 
     | 
    
         
             
                    int x, y, window_x, window_y;
         
     | 
| 
       85 
82 
     | 
    
         
             
                    SDL_GetWindowPosition(window, &window_x, &window_y);
         
     | 
| 
       86 
83 
     | 
    
         
             
                    SDL_GetGlobalMouseState(&x, &y);
         
     | 
| 
       87 
84 
     | 
    
         
             
                    mouse_x = x - window_x;
         
     | 
| 
       88 
85 
     | 
    
         
             
                    mouse_y = y - window_y;
         
     | 
| 
       89 
     | 
    
         
            -
                #else
         
     | 
| 
       90 
     | 
    
         
            -
                    int x, y;
         
     | 
| 
       91 
     | 
    
         
            -
                    SDL_GetMouseState(&x, &y);
         
     | 
| 
       92 
     | 
    
         
            -
                    mouse_x = x;
         
     | 
| 
       93 
     | 
    
         
            -
                    mouse_y = y;
         
     | 
| 
       94 
     | 
    
         
            -
                #endif
         
     | 
| 
       95 
86 
     | 
    
         
             
                }
         
     | 
| 
       96 
87 
     | 
    
         | 
| 
       97 
88 
     | 
    
         
             
                void set_mouse_position(double x, double y)
         
     | 
| 
         @@ -100,7 +91,7 @@ struct Gosu::Input::Impl 
     | 
|
| 
       100 
91 
     | 
    
         
             
                                          static_cast<int>((x - mouse_offset_x) / mouse_scale_x),
         
     | 
| 
       101 
92 
     | 
    
         
             
                                          static_cast<int>((y - mouse_offset_y) / mouse_scale_y));
         
     | 
| 
       102 
93 
     | 
    
         | 
| 
       103 
     | 
    
         
            -
                #if  
     | 
| 
      
 94 
     | 
    
         
            +
                #if !defined(GOSU_IS_X)
         
     | 
| 
       104 
95 
     | 
    
         
             
                    // On systems where we have a working GetGlobalMouseState, we can warp the mouse and
         
     | 
| 
       105 
96 
     | 
    
         
             
                    // retrieve its position directly afterwards.
         
     | 
| 
       106 
97 
     | 
    
         
             
                    update_mouse_position();
         
     | 
    
        data/src/Window.cpp
    CHANGED
    
    | 
         @@ -34,11 +34,7 @@ namespace Gosu 
     | 
|
| 
       34 
34 
     | 
    
         
             
                            throw_sdl_error("Could not initialize SDL Video");
         
     | 
| 
       35 
35 
     | 
    
         
             
                        }
         
     | 
| 
       36 
36 
     | 
    
         | 
| 
       37 
     | 
    
         
            -
                        Uint32 flags = SDL_WINDOW_OPENGL | SDL_WINDOW_HIDDEN;
         
     | 
| 
       38 
     | 
    
         
            -
             
     | 
| 
       39 
     | 
    
         
            -
                    #if SDL_VERSION_ATLEAST(2, 0, 1)
         
     | 
| 
       40 
     | 
    
         
            -
                        flags |= SDL_WINDOW_ALLOW_HIGHDPI;
         
     | 
| 
       41 
     | 
    
         
            -
                    #endif
         
     | 
| 
      
 37 
     | 
    
         
            +
                        Uint32 flags = SDL_WINDOW_OPENGL | SDL_WINDOW_HIDDEN | SDL_WINDOW_ALLOW_HIGHDPI;
         
     | 
| 
       42 
38 
     | 
    
         | 
| 
       43 
39 
     | 
    
         
             
                        window =
         
     | 
| 
       44 
40 
     | 
    
         
             
                            SDL_CreateWindow("", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, 64, 64, flags);
         
     | 
| 
         @@ -192,9 +188,7 @@ void Gosu::Window::resize(int width, int height, bool fullscreen) 
     | 
|
| 
       192 
188 
     | 
    
         
             
                    SDL_SetWindowSize(shared_window(), actual_width, actual_height);
         
     | 
| 
       193 
189 
     | 
    
         
             
                }
         
     | 
| 
       194 
190 
     | 
    
         | 
| 
       195 
     | 
    
         
            -
            #if SDL_VERSION_ATLEAST(2, 0, 1)
         
     | 
| 
       196 
191 
     | 
    
         
             
                SDL_GL_GetDrawableSize(shared_window(), &actual_width, &actual_height);
         
     | 
| 
       197 
     | 
    
         
            -
            #endif
         
     | 
| 
       198 
192 
     | 
    
         | 
| 
       199 
193 
     | 
    
         
             
                ensure_current_context();
         
     | 
| 
       200 
194 
     | 
    
         | 
| 
         @@ -221,9 +215,7 @@ bool Gosu::Window::resizable() const 
     | 
|
| 
       221 
215 
     | 
    
         
             
            void Gosu::Window::set_resizable(bool resizable)
         
     | 
| 
       222 
216 
     | 
    
         
             
            {
         
     | 
| 
       223 
217 
     | 
    
         
             
                pimpl->resizable = resizable;
         
     | 
| 
       224 
     | 
    
         
            -
            #if SDL_VERSION_ATLEAST(2, 0, 5)
         
     | 
| 
       225 
218 
     | 
    
         
             
                SDL_SetWindowResizable(shared_window(), resizable ? SDL_TRUE : SDL_FALSE);
         
     | 
| 
       226 
     | 
    
         
            -
            #endif
         
     | 
| 
       227 
219 
     | 
    
         
             
            }
         
     | 
| 
       228 
220 
     | 
    
         | 
| 
       229 
221 
     | 
    
         
             
            bool Gosu::Window::borderless() const
         
     | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,14 +1,14 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: gosu
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 1.1.0 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 1.1.0
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Julian Raschke
         
     | 
| 
       8 
8 
     | 
    
         
             
            autorequire:
         
     | 
| 
       9 
9 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       10 
10 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       11 
     | 
    
         
            -
            date: 2021-01- 
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2021-01-20 00:00:00.000000000 Z
         
     | 
| 
       12 
12 
     | 
    
         
             
            dependencies: []
         
     | 
| 
       13 
13 
     | 
    
         
             
            description: |2
         
     | 
| 
       14 
14 
     | 
    
         
             
                  2D game development library.
         
     | 
| 
         @@ -312,9 +312,9 @@ required_ruby_version: !ruby/object:Gem::Requirement 
     | 
|
| 
       312 
312 
     | 
    
         
             
                  version: 2.5.0
         
     | 
| 
       313 
313 
     | 
    
         
             
            required_rubygems_version: !ruby/object:Gem::Requirement
         
     | 
| 
       314 
314 
     | 
    
         
             
              requirements:
         
     | 
| 
       315 
     | 
    
         
            -
              - - " 
     | 
| 
      
 315 
     | 
    
         
            +
              - - ">="
         
     | 
| 
       316 
316 
     | 
    
         
             
                - !ruby/object:Gem::Version
         
     | 
| 
       317 
     | 
    
         
            -
                  version:  
     | 
| 
      
 317 
     | 
    
         
            +
                  version: '0'
         
     | 
| 
       318 
318 
     | 
    
         
             
            requirements: []
         
     | 
| 
       319 
319 
     | 
    
         
             
            rubygems_version: 3.2.3
         
     | 
| 
       320 
320 
     | 
    
         
             
            signing_key:
         
     |