mirror of
https://github.com/Almamu/linux-wallpaperengine.git
synced 2025-09-14 13:56:48 +08:00
Fixed scale for FBOs should default to 1
Signed-off-by: Alexis Maiquez <almamu@almamu.com>
This commit is contained in:
parent
691ac42e85
commit
aa755bb221
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
#include <utility>
|
#include <utility>
|
||||||
|
|
||||||
|
using namespace WallpaperEngine::Core;
|
||||||
using namespace WallpaperEngine::Core::Objects::Effects;
|
using namespace WallpaperEngine::Core::Objects::Effects;
|
||||||
|
|
||||||
CFBO::CFBO (std::string name, float scale, std::string format) :
|
CFBO::CFBO (std::string name, float scale, std::string format) :
|
||||||
@ -13,14 +14,14 @@ CFBO::CFBO (std::string name, float scale, std::string format) :
|
|||||||
|
|
||||||
CFBO* CFBO::fromJSON (json data)
|
CFBO* CFBO::fromJSON (json data)
|
||||||
{
|
{
|
||||||
auto name_it = data.find ("name");
|
auto name_it = jsonFindRequired (data, "name", "Name for an FBO is required");
|
||||||
auto scale_it = data.find ("scale");
|
auto scale = jsonFindDefault <float> (data, "scale", 1.0);
|
||||||
auto format_it = data.find ("format");
|
auto format = jsonFindDefault <std::string> (data, "format", "");
|
||||||
|
|
||||||
return new CFBO (
|
return new CFBO (
|
||||||
*name_it,
|
*name_it,
|
||||||
*scale_it,
|
scale,
|
||||||
*format_it
|
format
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
|
#include "WallpaperEngine/Core/Core.h"
|
||||||
#include <nlohmann/json.hpp>
|
#include <nlohmann/json.hpp>
|
||||||
|
|
||||||
namespace WallpaperEngine::Core::Objects::Effects
|
namespace WallpaperEngine::Core::Objects::Effects
|
||||||
|
Loading…
Reference in New Issue
Block a user