Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
UCC
progcomp2013
Commits
545652c9
Commit
545652c9
authored
Mar 23, 2013
by
Sam Moore
Browse files
Enable screensaver
Probably doesn't work
parent
7518ec8d
Changes
2
Hide whitespace changes
Inline
Side-by-side
qchess/qchess.py
View file @
545652c9
...
...
@@ -1874,8 +1874,10 @@ def load_images(image_dir=os.path.join(os.path.curdir, "data", "images")):
small_images
[
c
].
update
({
p
:
pygame
.
image
.
load
(
os
.
path
.
join
(
image_dir
,
c
+
"_"
+
p
+
"_small.png"
))})
# --- images.py --- #
graphics_enabled
=
True
try
:
import
pygame
os
.
environ
[
"SDL_VIDEO_ALLOW_SCREENSAVER"
]
=
"1"
except
:
graphics_enabled
=
False
...
...
@@ -1907,7 +1909,7 @@ class GraphicsThread(StoppableThread):
pygame
.
font
.
Font
(
os
.
path
.
join
(
os
.
path
.
curdir
,
"data"
,
"DejaVuSans.ttf"
),
32
).
render
(
"Hello"
,
True
,(
0
,
0
,
0
))
#load_images()
load
_images
()
create
_images
(
grid_sz
)
"""
for c in images.keys():
...
...
@@ -2631,4 +2633,4 @@ if __name__ == "__main__":
sys
.
exit
(
102
)
# --- main.py --- #
# EOF - created from make on
Thu
Mar 2
1
12:
27:36
WST 2013
# EOF - created from make on
Sat
Mar 2
3
12:
55:44
WST 2013
qchess/src/graphics.py
View file @
545652c9
graphics_enabled
=
True
try
:
import
pygame
os
.
environ
[
"SDL_VIDEO_ALLOW_SCREENSAVER"
]
=
"1"
except
:
graphics_enabled
=
False
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment