mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-21 06:45:39 -06:00
.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:
parent
235285246e
commit
35e80fc051
2 changed files with 5 additions and 1 deletions
|
|
@ -169,6 +169,9 @@ void RasterPlayer::Stop() {
|
|||
}
|
||||
|
||||
RasterPlayer& RasterPlayer::SetMT(bool _mt) {
|
||||
#ifndef _MULTITHREADED
|
||||
return *this;
|
||||
#endif
|
||||
bool wasrunning;
|
||||
INTERLOCKED_(mutex) {
|
||||
wasrunning = running;
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue