ruby-sdl2 0.3.4 → 0.3.5

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b2771d5b23b9123dacef73ac5e2272886d8ecf61413574f32a1afe99a0005c84
4
- data.tar.gz: 0e4008f249f2a2fc5dcdc08a05442e066e8234b4f139ee61a939df302c2f22ae
3
+ metadata.gz: 016174bf93fa2371562b5b7db39fad4ba4fe56ca33224bd426f124f71089c3f9
4
+ data.tar.gz: 4429f621dc957430f6532151481b4bfcaa10491bb5591a335d10b8f696e89769
5
5
  SHA512:
6
- metadata.gz: 0027ba375b82b62da2e2d5f0b08469df9616f4baeb5f121b49d68e504a92481faa28f3d19e887ef1e1f3ecfbc07cbcb6d12c7f85748dddad4151072d5f122f5e
7
- data.tar.gz: 0211c45fff38d1b637da897a9ce3a9b9eac4f9b0d297146f308e18fd5e885058d00aaa17c9cbe14c33bf8a1033db01866b26ced184ec32c27ea7cf68f6fc9352
6
+ metadata.gz: 1a2c0cb576204313adb1d8d1483d4f535366a4be0e2d33fc60c9bbe218197cae990031af9c0e7302fa8ff3051aa4e2f4b7664d9058313a0902d394c80dd4480a
7
+ data.tar.gz: 512fab96cd60f418159b7846b2891304458a88e4f58f5686683a3bfc00831834ae2a87d68683198d3716d60d00fe4b5bf1c689b9335d2e9b5139ed5475f91bc2
data/Rakefile CHANGED
@@ -51,7 +51,6 @@ def gem_spec
51
51
  spec.files = `git ls-files`.split(/\n/) + C_FROM_M4_FILES
52
52
  spec.test_files = []
53
53
  spec.extensions = ["extconf.rb"]
54
- spec.has_rdoc = false
55
54
  end
56
55
  end
57
56
 
data/extconf.rb CHANGED
@@ -53,6 +53,8 @@ have_header("SDL_filesystem.h")
53
53
  have_const("MIX_INIT_MODPLUG", "SDL_mixer.h")
54
54
  have_const("MIX_INIT_FLUIDSYNTH", "SDL_mixer.h")
55
55
  have_const("MIX_INIT_MID", "SDL_mixer.h")
56
-
56
+ have_const("SDL_RENDERER_PRESENTVSYNC", "SDL_render.h")
57
+ have_const("SDL_WINDOW_ALLOW_HIGHDPI", "SDL_video.h")
58
+ have_const("SDL_WINDOW_MOUSE_CAPTURE", "SDL_video.h")
57
59
 
58
60
  create_makefile('sdl2_ext')
@@ -1,6 +1,6 @@
1
1
  module SDL2
2
2
  # Version string of Ruby/SDL2
3
- VERSION = "0.3.4"
3
+ VERSION = "0.3.5"
4
4
  # Version of Ruby/SDL2, [major, minor, patch level]
5
5
  VERSION_NUMBER = VERSION.split(".").map(&:to_i)
6
6
  end
data/video.c.m4 CHANGED
@@ -426,7 +426,10 @@ VALUE find_window_by_id(Uint32 id)
426
426
  */
427
427
  static VALUE Window_destroy(VALUE self)
428
428
  {
429
- Window_destroy_internal(Get_Window(self));
429
+ Window* w = Get_Window(self);
430
+ Window_destroy_internal(w);
431
+ SDL_DestroyWindow(w->window);
432
+ w->window = NULL;
430
433
  return Qnil;
431
434
  }
432
435
 
@@ -2863,11 +2866,11 @@ void rubysdl2_init_video(void)
2863
2866
  DEFINE_WINDOW_FLAGS_CONST(MOUSE_FOCUS);
2864
2867
  /* window is not created by SDL */
2865
2868
  DEFINE_WINDOW_FLAGS_CONST(FOREIGN);
2866
- #ifdef SDL_WINDOW_ALLOW_HIGHDPI
2869
+ #ifdef HAVE_CONST_SDL_WINDOW_ALLOW_HIGHDPI
2867
2870
  /* window should be created in high-DPI mode if supported (>= SDL 2.0.1)*/
2868
2871
  DEFINE_WINDOW_FLAGS_CONST(ALLOW_HIGHDPI);
2869
2872
  #endif
2870
- #ifdef SDL_WINDOW_MOSUE_CAPTURE
2873
+ #ifdef HAVE_CONST_SDL_WINDOW_MOUSE_CAPTURE
2871
2874
  /* window has mouse caputred (>= SDL 2.0.4) */
2872
2875
  DEFINE_WINDOW_FLAGS_CONST(MOUSE_CAPTURE);
2873
2876
  #endif
@@ -2942,7 +2945,7 @@ void rubysdl2_init_video(void)
2942
2945
  DEFINE_RENDERER_FLAGS_CONST(SOFTWARE);
2943
2946
  /* the renderer uses hardware acceleration */
2944
2947
  DEFINE_RENDERER_FLAGS_CONST(ACCELERATED);
2945
- #ifdef SDL_RENDERER_PRESENTVSYNC
2948
+ #ifdef HAVE_CONST_SDL_RENDERER_PRESENTVSYNC
2946
2949
  /* present is synchronized with the refresh rate */
2947
2950
  DEFINE_RENDERER_FLAGS_CONST(PRESENTVSYNC);
2948
2951
  #endif
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-sdl2
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.4
4
+ version: 0.3.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ippei Obayashi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-10-12 00:00:00.000000000 Z
11
+ date: 2020-02-02 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: |2
14
14
  Ruby/SDL2 is an extension library to use SDL 2.x
@@ -98,8 +98,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
98
98
  - !ruby/object:Gem::Version
99
99
  version: '0'
100
100
  requirements: []
101
- rubyforge_project:
102
- rubygems_version: 2.7.6
101
+ rubygems_version: 3.0.3
103
102
  signing_key:
104
103
  specification_version: 4
105
104
  summary: The simple ruby extension library for SDL 2.x