summaryrefslogtreecommitdiff
path: root/Source/Core/InputCommon
diff options
context:
space:
mode:
authorRyan Houdek <Sonicadvance1@gmail.com>2013-06-11 08:23:32 -0500
committerRyan Houdek <Sonicadvance1@gmail.com>2013-06-11 08:23:32 -0500
commit8efdbcda9e70eba8f3d3208b580fd0c5d9a9cccb (patch)
tree8965f52942d37ac3e3efb0f7f38dc42a2b9de7e2 /Source/Core/InputCommon
parenta1276efe17383d00297e58a034e708f08817941f (diff)
[Android] Fix drawn buttons causing rendering issues.
Diffstat (limited to 'Source/Core/InputCommon')
-rw-r--r--Source/Core/InputCommon/Src/Android/ButtonManager.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/Source/Core/InputCommon/Src/Android/ButtonManager.cpp b/Source/Core/InputCommon/Src/Android/ButtonManager.cpp
index 947f7b0081..9ae996732d 100644
--- a/Source/Core/InputCommon/Src/Android/ButtonManager.cpp
+++ b/Source/Core/InputCommon/Src/Android/ButtonManager.cpp
@@ -37,9 +37,6 @@ namespace ButtonManager
void Init()
{
- glEnable(GL_BLEND);
- glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
-
// Initialize our buttons
m_buttons.push_back(new Button("ButtonA.png", BUTTON_A, m_coords[0]));
m_buttons.push_back(new Button("ButtonB.png", BUTTON_B, m_coords[1]));
@@ -83,8 +80,13 @@ namespace ButtonManager
void DrawButtons()
{
+ glEnable(GL_BLEND);
+ glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
+
for(auto it = m_buttons.begin(); it != m_buttons.end(); ++it)
DrawButton((*it)->GetTexture(), (*it)->GetCoords());
+
+ glDisable(GL_BLEND);
}
}