From 05ae49976b01cb38c8de451609a48c1e1769ad21 Mon Sep 17 00:00:00 2001 From: Tyler Perkins Date: Mon, 17 Jan 2022 15:03:13 -0500 Subject: [PATCH] Tweak plex panel code formatting --- src/panel/plex.cpp | 10 +++++----- src/panel/plex.hpp | 1 - 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/panel/plex.cpp b/src/panel/plex.cpp index a3b9e5d..08a3c4d 100644 --- a/src/panel/plex.cpp +++ b/src/panel/plex.cpp @@ -129,7 +129,7 @@ void plex::update(){ json_doc.Parse(json_string.c_str()); friendly_name = truncate(json_doc["response"]["data"].GetString(), PLEX_MAX_STRING_LENGTH - 10); - + json_string.clear(); } @@ -144,13 +144,13 @@ void plex::update_texture(){ //save the old colors SDL_GetRenderDrawColor(board::getRenderer(), &o_red, &o_green, &o_blue, &o_alpha); - + SDL_SetRenderTarget(board::getRenderer(), _texture); SDL_RenderClear(board::getRenderer()); //set the new color SDL_SetRenderDrawColor(board::getRenderer(), - PLEX_BGBOX_RED, PLEX_BGBOX_GREEN, + PLEX_BGBOX_RED, PLEX_BGBOX_GREEN, PLEX_BGBOX_BLUE, PLEX_BGBOX_ALPHA); //background image @@ -411,8 +411,8 @@ void plex::update_texture(){ void plex::initTexture(){ if(_texture == nullptr){ _texture = SDL_CreateTexture(board::getRenderer(), - SDL_PIXELFORMAT_RGBA8888, - SDL_TEXTUREACCESS_TARGET, + SDL_PIXELFORMAT_RGBA8888, + SDL_TEXTUREACCESS_TARGET, SCREEN_WIDTH, SCREEN_HEIGHT); SDL_SetTextureBlendMode(_texture, SDL_BLENDMODE_BLEND); diff --git a/src/panel/plex.hpp b/src/panel/plex.hpp index 1755da4..2f1627c 100644 --- a/src/panel/plex.hpp +++ b/src/panel/plex.hpp @@ -39,7 +39,6 @@ namespace dashboard::panel { CURL* api_curl; std::string json_string; rapidjson::Document json_doc; - struct plex_entry { std::string friendly_name; std::string ip_address;