shithub: cstory

Download patch

ref: ca8b5ccaa1a05e02638a3c667c9fccdff27c3313
parent: 81edd4db52645520c62790fc64262335ccef28a2
parent: 6cc976d4d625baaf549c28f7a8f205bbd8202fba
author: Gabriel Ravier <gabravier@gmail.com>
date: Thu Jul 2 11:26:33 EDT 2020

Merge branch 'portable' into portableMinimizeHeaders

# Conflicts:
#	src/BulHit.cpp

--- a/src/Backends/Audio/WiiU-Software.cpp
+++ b/src/Backends/Audio/WiiU-Software.cpp
@@ -192,8 +192,7 @@
 
 							AXVoiceDeviceMixData mix_data[6];
 							memset(mix_data, 0, sizeof(mix_data));
-							mix_data[0].bus[0].volume = i == 0 ? 0x8000 : 0;	// Channel 1 goes on the left speaker
-							mix_data[1].bus[0].volume = i == 1 ? 0x8000 : 0;	// Channel 2 goes on the right speaker
+							mix_data[i].bus[0].volume = 0x8000;	// Voice 1 goes on the left speaker - voice 2 goes on the right speaker
 
 							AXSetVoiceDeviceMix(voices[i], AX_DEVICE_TYPE_DRC, 0, mix_data);
 							AXSetVoiceDeviceMix(voices[i], AX_DEVICE_TYPE_TV, 0, mix_data);
@@ -243,11 +242,13 @@
 
 void AudioBackend_Deinit(void)
 {
-	for (unsigned int i = 0; i < 2; ++i)
-	{
-		AXFreeVoice(voices[i]);
-		free(stream_buffers[i]);
-	}
+	AXRegisterAppFrameCallback(NULL);
+
+	AXFreeVoice(voices[1]);
+	AXFreeVoice(voices[0]);
+
+	free(stream_buffers[1]);
+	free(stream_buffers[0]);
 
 	free(stream_buffer_long);
 
--- a/src/Bullet.cpp
+++ b/src/Bullet.cpp
@@ -1,5 +1,6 @@
 #include "Bullet.h"
 
+#include <stddef.h>
 #include <string.h>
 
 #include "WindowsWrapper.h"
--- a/src/Draw.cpp
+++ b/src/Draw.cpp
@@ -568,7 +568,7 @@
 
 // Dummied-out log function
 // According to the Mac port, its name really is just "out".
-static BOOL out(int unknown)
+BOOL out(int unknown)
 {
 	char unknown2[0x100];
 	int unknown3;
--- a/src/Ending.cpp
+++ b/src/Ending.cpp
@@ -1,5 +1,6 @@
 #include "Ending.h"
 
+#include <stddef.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
--- a/src/MyChar.cpp
+++ b/src/MyChar.cpp
@@ -1,5 +1,6 @@
 #include "MyChar.h"
 
+#include <stddef.h>
 #include <string.h>
 
 #include "WindowsWrapper.h"
--- a/src/MycParam.cpp
+++ b/src/MycParam.cpp
@@ -1,5 +1,6 @@
 #include "MycParam.h"
 
+#include <stddef.h>
 #include <stdio.h>
 #include <string>
 
--- a/src/NpcAct120.cpp
+++ b/src/NpcAct120.cpp
@@ -1,5 +1,6 @@
 #include "NpcAct.h"
 
+#include <stddef.h>
 #include <stdio.h>
 
 #include "WindowsWrapper.h"
--- a/src/TextScr.cpp
+++ b/src/TextScr.cpp
@@ -1,5 +1,6 @@
 #include "TextScr.h"
 
+#include <stddef.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>