shithub: cstory

Download patch

ref: cdd97cb733b08206fc53a1f374108609b87f7a20
parent: 4f7cc9582d341ffd876d4be908094417842093d0
author: Clownacy <Clownacy@users.noreply.github.com>
date: Mon Apr 13 09:32:31 EDT 2020

Some cleanup

--- a/src/Backends/Audio/miniaudio.cpp
+++ b/src/Backends/Audio/miniaudio.cpp
@@ -7,9 +7,9 @@
 #define MA_API static
 #include "../../../external/miniaudio.h"
 
+#include "../Misc.h"
 #include "../../Organya.h"
 #include "../../WindowsWrapper.h"
-#include "../Misc.h"
 
 #include "SoftwareMixer.h"
 
@@ -84,15 +84,19 @@
 	ma_result return_value;
 
 	return_value = ma_device_init(NULL, &config, &device);
+
 	if (return_value == MA_SUCCESS)
 	{
 		return_value = ma_mutex_init(device.pContext, &mutex);
+
 		if (return_value == MA_SUCCESS)
 		{
 			return_value = ma_mutex_init(device.pContext, &organya_mutex);
+
 			if (return_value == MA_SUCCESS)
 			{
 				return_value = ma_device_start(&device);
+
 				if (return_value == MA_SUCCESS)
 				{
 					output_frequency = device.sampleRate;
@@ -133,8 +137,7 @@
 
 void AudioBackend_Deinit(void)
 {
-	ma_result return_value;
-	return_value = ma_device_stop(&device);
+	ma_result return_value = ma_device_stop(&device);
 
 	if (return_value != MA_SUCCESS)
 		Backend_PrintError("Failed to stop playback device: %s", ma_result_description(return_value));
--- a/src/Backends/GLFW3/Controller.cpp
+++ b/src/Backends/GLFW3/Controller.cpp
@@ -7,8 +7,8 @@
 #define GLFW_INCLUDE_NONE
 #include <GLFW/glfw3.h>
 
-#include "../../WindowsWrapper.h"
 #include "../Misc.h"
+#include "../../WindowsWrapper.h"
 
 #define DEADZONE (10000.0f / 32767.0f)