From 35e80fc0519c8c6e58034059943add692e8a0eee Mon Sep 17 00:00:00 2001 From: koldo Date: Thu, 9 Sep 2010 18:58:22 +0000 Subject: [PATCH] .RasterPlayer: Fix and added SetMT in usc git-svn-id: svn://ultimatepp.org/upp/trunk@2679 f0d560ea-af0d-0410-9eb7-867de7ffcac7 --- uppsrc/RasterPlayer/RasterPlayer.cpp | 3 +++ uppsrc/RasterPlayer/RasterPlayer.usc | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/uppsrc/RasterPlayer/RasterPlayer.cpp b/uppsrc/RasterPlayer/RasterPlayer.cpp index ea0601a45..f8a8dd0dd 100644 --- a/uppsrc/RasterPlayer/RasterPlayer.cpp +++ b/uppsrc/RasterPlayer/RasterPlayer.cpp @@ -169,6 +169,9 @@ void RasterPlayer::Stop() { } RasterPlayer& RasterPlayer::SetMT(bool _mt) { +#ifndef _MULTITHREADED + return *this; +#endif bool wasrunning; INTERLOCKED_(mutex) { wasrunning = running; diff --git a/uppsrc/RasterPlayer/RasterPlayer.usc b/uppsrc/RasterPlayer/RasterPlayer.usc index afdfe1188..6f9829ad0 100644 --- a/uppsrc/RasterPlayer/RasterPlayer.usc +++ b/uppsrc/RasterPlayer/RasterPlayer.usc @@ -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); } } \ No newline at end of file