mirror of
https://github.com/Almamu/linux-wallpaperengine.git
synced 2025-09-14 05:46: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>
|
||||
|
||||
using namespace WallpaperEngine::Core;
|
||||
using namespace WallpaperEngine::Core::Objects::Effects;
|
||||
|
||||
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)
|
||||
{
|
||||
auto name_it = data.find ("name");
|
||||
auto scale_it = data.find ("scale");
|
||||
auto format_it = data.find ("format");
|
||||
auto name_it = jsonFindRequired (data, "name", "Name for an FBO is required");
|
||||
auto scale = jsonFindDefault <float> (data, "scale", 1.0);
|
||||
auto format = jsonFindDefault <std::string> (data, "format", "");
|
||||
|
||||
return new CFBO (
|
||||
*name_it,
|
||||
*scale_it,
|
||||
*format_it
|
||||
scale,
|
||||
format
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -2,6 +2,7 @@
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "WallpaperEngine/Core/Core.h"
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
namespace WallpaperEngine::Core::Objects::Effects
|
||||
|
Loading…
Reference in New Issue
Block a user