<?xml version="1.0"?>
<rss version="2.0">
	<channel>
		<title>Bug in 5.1.x al_set_standard_file_interface</title>
		<link>http://www.allegro.cc/forums/view/613596</link>
		<description>Allegro.cc Forum Thread</description>
		<webMaster>matthew@allegro.cc (Matthew Leverton)</webMaster>
		<lastBuildDate>Wed, 04 Dec 2013 18:59:32 +0000</lastBuildDate>
	</channel>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I think this is a bug...</p><p>the physfs version calls:</p><div class="source-code snippet"><div class="inner"><pre><span class="k1">void</span> <a href="http://www.allegro.cc/manual/al_set_physfs_file_interface"><span class="a">al_set_physfs_file_interface</span></a><span class="k2">(</span><span class="k1">void</span><span class="k2">)</span>
<span class="k2">{</span>
   <a href="http://www.allegro.cc/manual/al_set_new_file_interface"><span class="a">al_set_new_file_interface</span></a><span class="k2">(</span><span class="k3">&amp;</span>file_phys_vtable<span class="k2">)</span><span class="k2">;</span>
   _al_set_physfs_fs_interface<span class="k2">(</span><span class="k2">)</span><span class="k2">;</span>
<span class="k2">}</span>
</pre></div></div><p>

Which leadds to setting the actual interface:</p><div class="source-code snippet"><div class="inner"><pre><span class="k1">void</span> _al_set_physfs_fs_interface<span class="k2">(</span><span class="k1">void</span><span class="k2">)</span>
<span class="k2">{</span>
   <a href="http://www.allegro.cc/manual/al_set_fs_interface"><span class="a">al_set_fs_interface</span></a><span class="k2">(</span><span class="k3">&amp;</span>fs_phys_vtable<span class="k2">)</span><span class="k2">;</span>
<span class="k2">}</span>
</pre></div></div><p>

But, setting the standard one only sets new interface:
</p><div class="source-code snippet"><div class="inner"><pre>
<span class="c">/* Function: al_set_standard_file_interface</span>
<span class="c"> */</span>
<span class="k1">void</span> <a href="http://www.allegro.cc/manual/al_set_standard_file_interface"><span class="a">al_set_standard_file_interface</span></a><span class="k2">(</span><span class="k1">void</span><span class="k2">)</span>
<span class="k2">{</span>
   <a href="http://www.allegro.cc/manual/al_set_new_file_interface"><span class="a">al_set_new_file_interface</span></a><span class="k2">(</span><span class="k3">&amp;</span>_al_file_interface_stdio<span class="k2">)</span><span class="k2">;</span>
<span class="k2">}</span>
</pre></div></div><p>
For whatever reason, when I trace everything, the fs_interface is never set when calling al_set_standard_fs_interface.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (jmasterx)</author>
		<pubDate>Tue, 03 Dec 2013 23:59:19 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I consider this a bug in the PhysFS addon.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Peter Wang)</author>
		<pubDate>Wed, 04 Dec 2013 13:56:04 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I&#39;m not sure how it is all supposed to function but, the function to get the current filesystem interface resurns fs_interface and not new_fs_interface. I&#39;m not quite sure what new_fs_interface is used for. I noticed that when setting the physfs one, it sets both new_fs_interface and fs_interface variables of the tls object while calling set standard file interface only sets new_fs_interface. That is what lead me to believe standard file interface was incorrect, but it could be PhysFS that should only be setting the new interface variable.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (jmasterx)</author>
		<pubDate>Wed, 04 Dec 2013 18:59:32 +0000</pubDate>
	</item>
</rss>
