diff options
-rw-r--r-- | gui/fileselector.cpp | 8 | ||||
-rw-r--r-- | gui/listbox.cpp | 8 | ||||
-rw-r--r-- | minuitwrp/graphics.c | 10 | ||||
-rw-r--r-- | partition.cpp | 13 | ||||
-rw-r--r-- | partitionmanager.cpp | 3 |
5 files changed, 26 insertions, 16 deletions
diff --git a/gui/fileselector.cpp b/gui/fileselector.cpp index 0f8d903a3..b7804fd86 100644 --- a/gui/fileselector.cpp +++ b/gui/fileselector.cpp @@ -659,7 +659,7 @@ int GUIFileSelector::GetSelection(int x, int y) int GUIFileSelector::NotifyTouch(TOUCH_STATE state, int x, int y) { - static int lastY = 0, last2Y = 0; + static int lastY = 0, last2Y = 0, fastScroll = 0; int selection = 0; switch (state) @@ -674,6 +674,9 @@ int GUIFileSelector::NotifyTouch(TOUCH_STATE state, int x, int y) mUpdate = 1; startY = lastY = last2Y = y; scrollingSpeed = 0; + + if(mFastScrollRectX != -1 && x >= mRenderX + mRenderW - mFastScrollW) + fastScroll = 1; break; case TOUCH_DRAG: // Check if we dragged out of the selection window @@ -687,7 +690,7 @@ int GUIFileSelector::NotifyTouch(TOUCH_STATE state, int x, int y) } // Fast scroll - if(mFastScrollRectX != -1 && x >= mRenderX + mRenderW - mFastScrollW) + if(fastScroll) { int pct = ((y-mRenderY-mHeaderH)*100)/(mRenderH-mHeaderH); int totalSize = (mShowFolders ? mFolderList.size() : 0) + (mShowFiles ? mFileList.size() : 0); @@ -761,6 +764,7 @@ int GUIFileSelector::NotifyTouch(TOUCH_STATE state, int x, int y) case TOUCH_RELEASE: isHighlighted = false; + fastScroll = 0; if (startSelection >= 0) { // We've selected an item! diff --git a/gui/listbox.cpp b/gui/listbox.cpp index a4976f4e1..670966401 100644 --- a/gui/listbox.cpp +++ b/gui/listbox.cpp @@ -602,7 +602,7 @@ int GUIListBox::GetSelection(int x, int y) int GUIListBox::NotifyTouch(TOUCH_STATE state, int x, int y) { - static int lastY = 0, last2Y = 0; + static int lastY = 0, last2Y = 0, fastScroll = 0; int selection = 0; switch (state) @@ -617,6 +617,9 @@ int GUIListBox::NotifyTouch(TOUCH_STATE state, int x, int y) mUpdate = 1; startY = lastY = last2Y = y; scrollingSpeed = 0; + + if(mFastScrollRectX != -1 && x >= mRenderX + mRenderW - mFastScrollW) + fastScroll = 1; break; case TOUCH_DRAG: @@ -631,7 +634,7 @@ int GUIListBox::NotifyTouch(TOUCH_STATE state, int x, int y) } // Fast scroll - if(mFastScrollRectX != -1 && x >= mRenderX + mRenderW - mFastScrollW) + if(fastScroll) { int pct = ((y-mRenderY-mHeaderH)*100)/(mRenderH-mHeaderH); int totalSize = mList.size(); @@ -705,6 +708,7 @@ int GUIListBox::NotifyTouch(TOUCH_STATE state, int x, int y) case TOUCH_RELEASE: isHighlighted = false; + fastScroll = 0; if (startSelection >= 0) { // We've selected an item! diff --git a/minuitwrp/graphics.c b/minuitwrp/graphics.c index fc34b6b19..99f584183 100644 --- a/minuitwrp/graphics.c +++ b/minuitwrp/graphics.c @@ -69,6 +69,7 @@ static GGLSurface gr_framebuffer[NUM_BUFFERS]; static GGLSurface gr_mem_surface; static unsigned gr_active_fb = 0; static unsigned double_buffering = 0; +static int gr_is_curr_clr_opaque = 0; static int gr_fb_fd = -1; static int gr_vt_fd = -1; @@ -288,6 +289,8 @@ void gr_color(unsigned char r, unsigned char g, unsigned char b, unsigned char a color[2] = ((b << 8) | b) + 1; color[3] = ((a << 8) | a) + 1; gl->color4xv(gl, color); + + gr_is_curr_clr_opaque = (a == 255); } int gr_measureEx(const char *s, void* font) @@ -463,8 +466,15 @@ int twgr_text(int x, int y, const char *s) void gr_fill(int x, int y, int w, int h) { GGLContext *gl = gr_context; + + if(gr_is_curr_clr_opaque) + gl->disable(gl, GGL_BLEND); + gl->disable(gl, GGL_TEXTURE_2D); gl->recti(gl, x, y, x + w, y + h); + + if(gr_is_curr_clr_opaque) + gl->enable(gl, GGL_BLEND); } void gr_blit(gr_surface source, int sx, int sy, int w, int h, int dx, int dy) { diff --git a/partition.cpp b/partition.cpp index b79e774cb..95f6bcac4 100644 --- a/partition.cpp +++ b/partition.cpp @@ -361,10 +361,6 @@ bool TWPartition::Process_Fstab_Line(string Line, bool Display_Error) { Is_Storage = true; Removable = true; Wipe_Available_in_GUI = true; -#ifndef RECOVERY_SDCARD_ON_DATA - Setup_AndSec(); - Mount_Storage_Retry(); -#endif #endif } #ifdef TW_INTERNAL_STORAGE_PATH @@ -373,20 +369,12 @@ bool TWPartition::Process_Fstab_Line(string Line, bool Display_Error) { Is_Settings_Storage = true; Storage_Path = EXPAND(TW_INTERNAL_STORAGE_PATH); Wipe_Available_in_GUI = true; -#ifndef RECOVERY_SDCARD_ON_DATA - Setup_AndSec(); - Mount_Storage_Retry(); -#endif } #else if (Mount_Point == "/emmc" || Mount_Point == "/internal_sd" || Mount_Point == "/internal_sdcard") { Is_Storage = true; Is_Settings_Storage = true; Wipe_Available_in_GUI = true; -#ifndef RECOVERY_SDCARD_ON_DATA - Setup_AndSec(); - Mount_Storage_Retry(); -#endif } #endif } else if (Is_Image(Fstab_File_System)) { @@ -663,6 +651,7 @@ void TWPartition::Setup_AndSec(void) { Backup_Path = Symlink_Mount_Point; Make_Dir("/and-sec", true); Recreate_AndSec_Folder(); + Mount_Storage_Retry(); } void TWPartition::Find_Real_Block_Device(string& Block, bool Display_Error) { diff --git a/partitionmanager.cpp b/partitionmanager.cpp index 091ae3288..04dbee967 100644 --- a/partitionmanager.cpp +++ b/partitionmanager.cpp @@ -96,6 +96,9 @@ int TWPartitionManager::Process_Fstab(string Fstab_Filename, bool Display_Error) for (iter = Partitions.begin(); iter != Partitions.end(); iter++) { if ((*iter)->Is_Storage) { (*iter)->Is_Settings_Storage = true; +#ifndef RECOVERY_SDCARD_ON_DATA + (*iter)->Setup_AndSec(); +#endif Found_Settings_Storage = true; DataManager::SetValue("tw_settings_path", (*iter)->Storage_Path); DataManager::SetValue("tw_storage_path", (*iter)->Storage_Path); |