Projects
Essentials
lightspark
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 117
View file
lightspark.spec
Changed
@@ -20,7 +20,7 @@ %bcond_without librtmp Name: lightspark -Version: 0.7.2.99+git20160911.1713 +Version: 0.7.2.99+git20160913.0953 Release: 0 Summary: Modern, free, open-source flash player implementation License: LGPL-3.0+
View file
lightspark.tar.xz/src/backends/input.cpp
Changed
@@ -378,11 +378,13 @@ { GtkClipboard *clipboard; clipboard = gtk_clipboard_get(GDK_SELECTION_CLIPBOARD); - gtk_clipboard_set_text(clipboard, m_sys->getErrorCause().c_str(), - m_sys->getErrorCause().size()); + std::string s = "SWF file: "; + s.append(m_sys->mainClip->getOrigin().getParsedURL()); + s.append("\n"); + s.append(m_sys->getErrorCause()); + gtk_clipboard_set_text(clipboard, s.c_str(),s.size()); clipboard = gtk_clipboard_get(GDK_SELECTION_PRIMARY); - gtk_clipboard_set_text(clipboard, m_sys->getErrorCause().c_str(), - m_sys->getErrorCause().size()); + gtk_clipboard_set_text(clipboard, s.c_str(), s.size()); LOG(LOG_INFO, "Copied error to clipboard"); } else
View file
lightspark.tar.xz/src/parsing/tags.cpp
Changed
@@ -394,9 +394,11 @@ case SYMBOL_CLASS_TAG: case ABC_TAG: case CONTROL_TAG: - case ACTION_TAG: delete tag; throw ParseException("Control tag inside a sprite. Should not happen."); + case ACTION_TAG: + delete tag; + break; case FRAMELABEL_TAG: addFrameLabel(frames.size()-1,static_cast<FrameLabelTag*>(tag)->Name); delete tag;
View file
lightspark.tar.xz/src/scripting/flash/display/DisplayObject.cpp
Changed
@@ -97,7 +97,7 @@ } DisplayObject::DisplayObject(Class_base* c):EventDispatcher(c),tx(0),ty(0),rotation(0), - sx(1),sy(1),alpha(1.0),maskOf(),parent(),constructed(false),useLegacyMatrix(true),onStage(false), + sx(1),sy(1),alpha(1.0),isLoadedRoot(false),maskOf(),parent(),constructed(false),useLegacyMatrix(true),onStage(false), visible(true),mask(),invalidateQueueNext(),loaderInfo(),filters(Class<Array>::getInstanceSNoArgs(c->getSystemState())),cacheAsBitmap(false) { name = tiny_string("instance") + Integer::toString(ATOMIC_INCREMENT(instanceCount)); @@ -815,7 +815,15 @@ ASFUNCTIONBODY(DisplayObject,_getRoot) { DisplayObject* th=static_cast<DisplayObject*>(obj); - _NR<RootMovieClip> ret=th->getRoot(); + _NR<DisplayObject> ret; + + if (th->isLoadedRootObject()) + ret = _NR<DisplayObject>(th); + else if (th->is<Stage>()) + // according to spec, the root of the stage is the stage itself + ret = _NR<DisplayObject>(th); + else + ret =th->getRoot(); if(ret.isNull()) return obj->getSystemState()->getUndefinedRef();
View file
lightspark.tar.xz/src/scripting/flash/display/DisplayObject.h
Changed
@@ -43,6 +43,7 @@ friend class AsyncDrawJob; friend class Transform; friend class ParseThread; +friend class Loader; friend std::ostream& operator<<(std::ostream& s, const DisplayObject& r); public: enum HIT_TYPE { GENERIC_HIT, // point is over the object @@ -59,6 +60,8 @@ number_t sx,sy,sz; float alpha; tiny_string blendMode; + // if true, this displayobject is the root object of a loaded file (swf or image) + bool isLoadedRoot; public: UI16_SWF Ratio; UI16_SWF ClipDepth; @@ -162,7 +165,8 @@ virtual void setOnStage(bool staged); bool isOnStage() const { return onStage; } bool isMask() const { return !maskOf.isNull(); } - bool isVisible() const { return visible; }; + bool isVisible() const { return visible; } + bool isLoadedRootObject() const { return isLoadedRoot; } float clippedAlpha() const; virtual _NR<RootMovieClip> getRoot(); virtual _NR<Stage> getStage();
View file
lightspark.tar.xz/src/scripting/flash/display/flashdisplay.cpp
Changed
@@ -680,6 +680,7 @@ { SpinlockLocker l(spinlock); content=o; + content->isLoadedRoot = true; loaded=true; }
View file
lightspark.tar.xz/src/swftypes.cpp
Changed
@@ -1635,8 +1635,20 @@ if (v.HasLoops) stream >> v.LoopCount; if (v.HasEnvelope) + { stream >> v.EnvPoints; - // TODO: EnvelopeRecords + if (v.EnvPoints) + LOG(LOG_NOT_IMPLEMENTED,"SOUNDENVELOPE settings are read but not used"); + + for (unsigned int i = 0; i < v.EnvPoints;i++) + { + SOUNDENVELOPE env; + stream >> env.Pos44; + stream >> env.LeftLevel; + stream >> env.RightLevel; + v.SoundEnvelope.push_back(env); + } + } return stream; }
View file
lightspark.tar.xz/src/swftypes.h
Changed
@@ -1317,6 +1317,14 @@ CLIPEVENTFLAGS AllEventFlags; }; +class SOUNDENVELOPE +{ +public: + UI32_SWF Pos44; + UI16_SWF LeftLevel; + UI16_SWF RightLevel; +}; + class SOUNDINFO { public: @@ -1330,6 +1338,7 @@ UI32_SWF OutPoint; UI16_SWF LoopCount; UI8 EnvPoints; + std::vector<SOUNDENVELOPE> SoundEnvelope; }; class RunState
View file
lightspark.tar.xz/src/threading.cpp
Changed
@@ -118,6 +118,10 @@ void CondTime::addMilliseconds(long ms) { timepoint+=(gint64)ms*G_TIME_SPAN_MILLISECOND; + // don't allow that next timepoint will be in the past + gint64 now=g_get_monotonic_time(); + if (timepoint < now) + timepoint= now + (gint64)ms*G_TIME_SPAN_MILLISECOND; } bool CondTime::wait(Mutex& mutex, Cond& cond)
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.