smalruby 0.0.28-x86-mingw32 → 0.0.29-x86-mingw32
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of smalruby might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/lib/smalruby/hardware.rb +7 -4
- data/lib/smalruby/version.rb +1 -1
- data/lib/smalruby.rb +5 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9055cdbe4363fdb124c7bf8e901ba3660211784e
|
4
|
+
data.tar.gz: 86653734c1238b5db0a2e4738f15aeb29e96b53c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c52361b582b109c938155f9e82b0c25ca8297df7077ae1e29aab6c3d5cd6cb698997e9ed638d277519a3a3ffdbd7442ce7ffdec2282111dc632e85c62d74e175
|
7
|
+
data.tar.gz: 5116cc90b8acaf4a6e21ae879901958d5a84c9d95ea2f0c4566a904164002cb2c6ef9c2979ef03bf02d8628f4d71ae211ed24d6fa81d5ce619c1762655b38b4b
|
data/lib/smalruby/hardware.rb
CHANGED
@@ -50,10 +50,7 @@ module Smalruby
|
|
50
50
|
@initialized_hardware = true
|
51
51
|
rescue Exception
|
52
52
|
Util.print_exception($!)
|
53
|
-
|
54
|
-
canvas = Canvas.new(height: 32)
|
55
|
-
canvas.draw_font(string: 'ハードウェアの準備に失敗しました',
|
56
|
-
color: 'red')
|
53
|
+
@failed_init_hardware = true
|
57
54
|
end
|
58
55
|
end
|
59
56
|
|
@@ -67,6 +64,11 @@ module Smalruby
|
|
67
64
|
end
|
68
65
|
end
|
69
66
|
|
67
|
+
# ハードウェアの初期化に失敗したかどうかを返す
|
68
|
+
def failed?
|
69
|
+
@failed_init_hardware
|
70
|
+
end
|
71
|
+
|
70
72
|
# ハードウェアのインスタンスを生成する
|
71
73
|
#
|
72
74
|
# 作成したハードウェアのインスタンスはキャッシュする
|
@@ -86,6 +88,7 @@ module Smalruby
|
|
86
88
|
private
|
87
89
|
|
88
90
|
@initialized_hardware = false
|
91
|
+
@failed_init_hardware = false
|
89
92
|
@hardware_cache = {}
|
90
93
|
@hardware_cache.extend(Mutex_m)
|
91
94
|
end
|
data/lib/smalruby/version.rb
CHANGED
data/lib/smalruby.rb
CHANGED
@@ -126,6 +126,11 @@ module Smalruby
|
|
126
126
|
unless world.objects.any? { |o| o.is_a?(Stage) }
|
127
127
|
Stage.new(color: 'white') unless Util.raspberrypi?
|
128
128
|
end
|
129
|
+
if Hardware.failed?
|
130
|
+
canvas = Canvas.new(height: 32)
|
131
|
+
canvas.draw_font(string: 'ハードウェアの準備に失敗しました',
|
132
|
+
color: 'red')
|
133
|
+
end
|
129
134
|
world.objects.each do |object|
|
130
135
|
object.start
|
131
136
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: smalruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.29
|
5
5
|
platform: x86-mingw32
|
6
6
|
authors:
|
7
7
|
- Kouji Takao
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-07-
|
11
|
+
date: 2014-07-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|