.RasterPlayer: Fix and added SetMT in usc

git-svn-id: svn://ultimatepp.org/upp/trunk@2679 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
koldo 2010-09-09 18:58:22 +00:00
parent 235285246e
commit 35e80fc051
2 changed files with 5 additions and 1 deletions

View file

@ -169,6 +169,9 @@ void RasterPlayer::Stop() {
}
RasterPlayer& RasterPlayer::SetMT(bool _mt) {
#ifndef _MULTITHREADED
return *this;
#endif
bool wasrunning;
INTERLOCKED_(mutex) {
wasrunning = running;

View file

@ -7,6 +7,7 @@ ctrl RasterPlayer {
Frame SetFrame @1;
Color SetBackground;
int SetSpeed = 1;
bool SetMT = 0;
Paint(w) {
r = GetRect();
@ -21,6 +22,6 @@ ctrl RasterPlayer {
img = "RasterPlayer:RasterPlayer.iml:clip";
s = min(min(r.right-r.left, r.bottom-r.top)-1, 150);
w.DrawImage(r.left, r.top, r.left+s, r.top+s, img);
w.DrawImage(r.left+(sz.cx-s)/2, r.top+(sz.cy-s)/2, r.left+s, r.top+s, img);
}
}