gosu 0.8.5 → 0.8.6.pre1
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/Window.cpp +12 -1
- metadata +6 -6
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: cc39c3ae9a1e77e6b0519c38f7764ba3c21233e0
|
|
4
|
+
data.tar.gz: 9f36554464a7c894e529dfce04a347aad5cda10f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1a5f157274188f42de5034fe336ab108e97184f59019c1143e88f3234a0e114ca171bd524511319bdeeb1e83bcdc5005f90aa3c5d0dbedf0cd86e588748e33a2
|
|
7
|
+
data.tar.gz: 2899c718ce34b51cc2df01665b63f051bd7353fba88fae5bc12e297f7beaeba79c08089ed2dcbde84da0890774ae122797206246d642a15ccbc4d1f0f13b7564
|
data/src/Window.cpp
CHANGED
|
@@ -12,6 +12,12 @@ namespace Gosu
|
|
|
12
12
|
{
|
|
13
13
|
void registerFrame();
|
|
14
14
|
}
|
|
15
|
+
|
|
16
|
+
void throwSDLError(const std::string& operation)
|
|
17
|
+
{
|
|
18
|
+
const char *error = SDL_GetError();
|
|
19
|
+
throw std::runtime_error(operation + ": " + (error ? error : "(unknown error)"));
|
|
20
|
+
}
|
|
15
21
|
}
|
|
16
22
|
|
|
17
23
|
struct Gosu::Window::Impl
|
|
@@ -28,7 +34,7 @@ Gosu::Window::Window(unsigned width, unsigned height, bool fullscreen, double up
|
|
|
28
34
|
: pimpl(new Impl)
|
|
29
35
|
{
|
|
30
36
|
if (SDL_Init(SDL_INIT_VIDEO) < 0)
|
|
31
|
-
|
|
37
|
+
throwSDLError("Could not initialize SDL Video");
|
|
32
38
|
|
|
33
39
|
int actualWidth = width;
|
|
34
40
|
int actualHeight = height;
|
|
@@ -75,6 +81,8 @@ Gosu::Window::Window(unsigned width, unsigned height, bool fullscreen, double up
|
|
|
75
81
|
pimpl->window = SDL_CreateWindow("",
|
|
76
82
|
SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED,
|
|
77
83
|
actualWidth, actualHeight, flags);
|
|
84
|
+
if (! pimpl->window)
|
|
85
|
+
throwSDLError("Could not open window");
|
|
78
86
|
|
|
79
87
|
#ifdef GOSU_IS_OPENGLES
|
|
80
88
|
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 1);
|
|
@@ -86,6 +94,9 @@ Gosu::Window::Window(unsigned width, unsigned height, bool fullscreen, double up
|
|
|
86
94
|
#endif
|
|
87
95
|
|
|
88
96
|
pimpl->context = SDL_GL_CreateContext(pimpl->window);
|
|
97
|
+
if (! pimpl->context)
|
|
98
|
+
throwSDLError("Could not create OpenGL context");
|
|
99
|
+
|
|
89
100
|
SDL_GL_MakeCurrent(pimpl->window, pimpl->context);
|
|
90
101
|
SDL_GL_SetSwapInterval(1);
|
|
91
102
|
|
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: 0.8.
|
|
4
|
+
version: 0.8.6.pre1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Julian Raschke
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2014-09
|
|
11
|
+
date: 2014-11-09 00:00:00.000000000 Z
|
|
12
12
|
dependencies: []
|
|
13
13
|
description: |2
|
|
14
14
|
2D game development library.
|
|
@@ -170,17 +170,17 @@ require_paths:
|
|
|
170
170
|
- lib
|
|
171
171
|
required_ruby_version: !ruby/object:Gem::Requirement
|
|
172
172
|
requirements:
|
|
173
|
-
- -
|
|
173
|
+
- - '>='
|
|
174
174
|
- !ruby/object:Gem::Version
|
|
175
175
|
version: 1.8.2
|
|
176
176
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
177
177
|
requirements:
|
|
178
|
-
- -
|
|
178
|
+
- - '>'
|
|
179
179
|
- !ruby/object:Gem::Version
|
|
180
|
-
version:
|
|
180
|
+
version: 1.3.1
|
|
181
181
|
requirements: []
|
|
182
182
|
rubyforge_project:
|
|
183
|
-
rubygems_version: 2.
|
|
183
|
+
rubygems_version: 2.3.0
|
|
184
184
|
signing_key:
|
|
185
185
|
specification_version: 4
|
|
186
186
|
summary: 2D game development library.
|